Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Aug 2007 17:53:00 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        mal content <artifact.one@googlemail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: CPU activity as percentage.
Message-ID:  <20070804075300.GO1262@turion.vk2pj.dyndns.org>
In-Reply-To: <8e96a0b90708040010r3980d5ffj709e16058740955a@mail.gmail.com>
References:  <8e96a0b90708040010r3980d5ffj709e16058740955a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--nYySOmuH/HDX6pKp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2007-Aug-04 08:10:13 +0100, mal content <artifact.one@googlemail.com> wr=
ote:
>  if (sysctlbyname("kern.cp_time", cp_time, &len, 0, 0) < 0) return 0;

kern.cp_time returns a set of counters that are incrememted at
kern.clockrate{stathz}.  To calculate CPU activity, you need to look
at the change in counters over a defined period.

--=20
Peter Jeremy

--nYySOmuH/HDX6pKp
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFGtDBc/opHv/APuIcRAsMfAJ9wXMh7noNvEJBpkC7dB4h/Fyw98ACeMvPq
yU3T9lUBZExQxvw0gRN61sk=
=4hUU
-----END PGP SIGNATURE-----

--nYySOmuH/HDX6pKp--



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