On Fri, 25 Feb 2000, James Housley wrote:

> I am trying to find out the current % idle of the machine from within a
> program.  I have looked at the valuse provided by sysctl and found
> loadavg but not system idle.  I have also looked through the source for
> top and haven't been able to figure that out.  All pointers would be
> appreciated.

Last time I needed these values (for an LCD panel driver) I just stole the
code from top. :)

It involves grubbing around in kvm and counting ticks.

Doug White                    |  FreeBSD: The Power to Serve
[EMAIL PROTECTED]     |  www.FreeBSD.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to