Re: CPU activity as percentage.

看板FB_hackers作者時間18年前 (2007/08/13 14:38), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
--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--
文章代碼(AID): #16l_ne00 (FB_hackers)
文章代碼(AID): #16l_ne00 (FB_hackers)