Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2000 20:11:35 -0800 (PST)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        James Housley <jim@thehousleys.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Finding percent idle
Message-ID:  <Pine.BSF.4.21.0002252010280.90894-100000@resnet.uoregon.edu>
In-Reply-To: <38B6D73A.9C13F02C@thehousleys.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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
dwhite@resnet.uoregon.edu     |  www.FreeBSD.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0002252010280.90894-100000>