Re: CPU activity as percentage.
On 04/08/07, Peter Jeremy <peterjeremy@optushome.com.au> wrote:
> On 2007-Aug-04 08:10:13 +0100, mal content <artifact.one@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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
討論串 (同標題文章)