Re: CPU activity as percentage.
--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--
討論串 (同標題文章)