Date: Fri, 2 Apr 2004 10:46:02 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Jose Marcio Martins da Cruz <Jose-Marcio.Martins@ensmp.fr> Cc: freebsd-hackers@freebsd.org Subject: Re: Pointers about CPU load measuring Message-ID: <20040402184600.GD11637@Odin.AC.HMC.Edu> In-Reply-To: <406D6CEF.9030501@ensmp.fr> References: <406D6CEF.9030501@ensmp.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
--C+ts3FVlLX8+P6JN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 02, 2004 at 03:38:55PM +0200, Jose Marcio Martins da Cruz wrote: >=20 > Someone can send some pointers on how to measure global CPU load under=20 > FreeBSD from a C program ? I'm looking for values for idle/kernel/user,= =20 > in a similar way as does top. Is there any pointer or doc ?. I'd like to= =20 > avoir browsing top code. The top code is rather gross. You might take a look at the Ganglia source code. It products metrics like that in fairly focused functions so it's more readable then top. The file you're intrested in is here: http://cvs.sourceforge.net/viewcvs.py/ganglia/monitor-core/gmond/machines/f= reebsd.c?rev=3D1.7&view=3Dauto If you want to play with the whole thing, the sysutils/ganglia-monitor-core port may be of use. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --C+ts3FVlLX8+P6JN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAbbTnXY6L6fI4GtQRAqsJAJ9CMg2AJNNt31VZ1sTqlShQiULoCwCdF9c3 O5MOcBHylk7bfBeQi1pWe4I= =FRFG -----END PGP SIGNATURE----- --C+ts3FVlLX8+P6JN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040402184600.GD11637>