Skip site navigation (1)Skip section navigation (2)
Date:      15 Nov 1999 15:38:43 +0100
From:      Dag-Erling Smorgrav <des@flood.ping.uio.no>
To:        Nicolai Petri Secure <nppsecure@distortion.dk>
Cc:        current@FreeBSD.ORG
Subject:   Re: Stats in kernelmode (Screensaver)
Message-ID:  <xzpyabz3jm4.fsf@flood.ping.uio.no>
In-Reply-To: Nicolai Petri Secure's message of "Tue, 9 Nov 1999 02:00:25 %2B0100 (CET)"
References:  <Pine.BSF.4.05.9911090157430.77645-100000@distortion.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Nicolai Petri Secure <nppsecure@distortion.dk> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpyabz3jm4.fsf>