CPU activity as percentage.
Peter Jeremy
peterjeremy at optushome.com.au
Sat Aug 4 00:53:03 PDT 2007
On 2007-Aug-04 08:10:13 +0100, mal content <artifact.one at googlemail.com> wrote:
> if (sysctlbyname("kern.cp_time", cp_time, &len, 0, 0) < 0) return 0;
kern.cp_time returns a set of counters that are incrememted at
kern.clockrate{stathz}. To calculate CPU activity, you need to look
at the change in counters over a defined period.
--
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070804/ec7057ce/attachment.pgp
More information about the freebsd-hackers
mailing list