DragonFly users List (threaded) for 2005-04
Re: SMP CPU Statistics
I am on it. Expect progress report in three days.
Matthew Dillon wrote:
:I'm trying to write a simple CPU load monitor program that can measure load
:on multiple CPUs. I have been looking at top and ps sourcecode and have
:come across the kinfo_get_sched_cputime function which is basically a
:measure of the overall system load. Is there any way to measure load on a
We have been slowly moving various statistics from globals to
per-cpu. The scheduling stats would be very easy to do but
they have not yet been moved.
Would someone like a go at doing the scheduling stats? Basically
(1) moving the struct cp_time in kern/kern_clock.c into the
(2) changing the code that updates it in kern/kern_clock.c to update
the per-cpu version instead.
(3) Changing the sysctl to return the cp_time for all cpus in an array.
(4) Changing libkinfo and libkcore to retrieve and aggregate the
cp_time info from all the cpus (and to also give an API to allow
the info from a single cpu to be extracted).