Date: Thu, 5 Oct 2000 13:02:47 -0700 (PDT) From: Richard Hodges <rh@matriplex.com> To: freebsd-hackers@freebsd.org Subject: A decent way to get CPU idle time? Message-ID: <Pine.BSF.4.10.10010051250410.38513-100000@mail.matriplex.com>
next in thread | raw e-mail | index | archive | help
Greetings! Is there a clean and decent way to find out the percentage of CPU idle time, like top and systat give? I have browsed the source for both, and neither appear to have a simple way of finding this information. I have already tried and rejected getloadavg. In my application, two main processes will always account for 95% or more of the activity. I suppose I could use RDTSC to grab the clock on my system calls, and figure a rudimentary sum of CPU activity, but that won't help me with the expensive file and socket calls. And I would pretty much have to guess about the CPU time spent in the kernel. Any ideas? Thanks. -Richard ------------------------------------------- Richard Hodges | Matriplex, inc. rh@matriplex.com | 769 Basque Way 775-886-6477 | Carson City, NV 89706 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10010051250410.38513-100000>