Subject: Re: getting cpu utilization
To: George Georgalis <george@galis.org>
From: Chuck Swiger <cswiger@mac.com>
List: netbsd-users
Date: 01/11/2007 16:51:43
On Jan 11, 2007, at 4:39 PM, George Georgalis wrote:
> That returns the inverse of the cpu idle % found in top. I add
> 1 to the value before I invert it to prevent divide by zero, so
> output is pretty much between 0 and 1.
>
> Running two top reports seems a pretty inefficient way to get the
> value. I think I can tune top a bit, but is there a more direct
> way to get the measurement?
Is the info from "sysctl vm.loadavg" (or the 'uptime' command) close
enough to what you are looking for?
--
-Chuck