From owner-freebsd-current Mon Nov 15 6:39:21 1999 Delivered-To: freebsd-current@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 46E8514C83 for ; Mon, 15 Nov 1999 06:39:04 -0800 (PST) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id PAA40981; Mon, 15 Nov 1999 15:38:44 +0100 (CET) (envelope-from des) To: Nicolai Petri Secure Cc: current@FreeBSD.ORG Subject: Re: Stats in kernelmode (Screensaver) References: From: Dag-Erling Smorgrav Date: 15 Nov 1999 15:38:43 +0100 In-Reply-To: Nicolai Petri Secure's message of "Tue, 9 Nov 1999 02:00:25 +0100 (CET)" Message-ID: Lines: 17 User-Agent: Gnus/5.070097 (Pterodactyl Gnus v0.97) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nicolai Petri Secure writes: > I'm currently programming a screensaver the shows statistics (cpu load and > stuff) but the interface for doing it in kernel mode sucks.. What is the > right way to do it ? Check out the sysctl(8) source to see how it special-cases vm.loadavg; find out where the data comes from (search the kernel source for the string 'loadavg') and figure out a way to do the math without using floating-point (which doesn't work in the kernel). > And would the screensaver be subject for entering the main source tree ? Yes. DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message