DragonFly users List (threaded) for 2005-12
Re: show individual cpu usage?
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!
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).
hmp at dragonflybsd.org