show individual cpu usage?

Hiten Pandya hmp at
Fri Dec 16 05:42:25 PST 2005

Matthew Dillon wrote:
    The statistics are collected by statclock(), which is run from a 
    systimer on each cpu

    The data is available on a per-cpu basis via the cputime_percpu[]
    array and a sysctl aggregates it all together.  It would not be
    difficult to add a sysctl that returns the information on a per-cpu
    basis and then add userland features to extract and display it.  It
    would be a nifty little project for you!
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>
It's all done and sitting on my LEAF account.  I don't know if you
remember, we wrote a program to retrieve the CPU usage statistics
and I wrote the kernel support for it quite a while ago including the
Hold on for few days, I will send you the program.  It's not committed
because it wasn't ready to be integrated into top(1).

Hiten Pandya
hmp at

More information about the Users mailing list