DragonFly BSD
DragonFly users List (threaded) for 2005-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: show individual cpu usage?

To: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
From: Hiten Pandya <hmp@xxxxxxxxxxxxx>
Date: Fri, 16 Dec 2005 13:42:25 +0000

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@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 sysctls.

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 dragonflybsd.org

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]