CPU activity as percentage.
mal content
artifact.one at googlemail.com
Sat Aug 4 01:49:34 PDT 2007
On 04/08/07, Peter Jeremy <peterjeremy at optushome.com.au> wrote:
> 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.
*ahem*
That would explain it then.
thanks,
MC
More information about the freebsd-hackers
mailing list