From owner-freebsd-hackers Fri Feb 25 20:11:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id B97EA37BC0F for ; Fri, 25 Feb 2000 20:11:44 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id UAA17499; Fri, 25 Feb 2000 20:11:35 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Fri, 25 Feb 2000 20:11:35 -0800 (PST) From: Doug White To: James Housley Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Finding percent idle In-Reply-To: <38B6D73A.9C13F02C@thehousleys.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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