show individual cpu usage?
dillon at apollo.backplane.com
Fri Dec 16 01:39:12 PST 2005
:procps top(1) used on Linux can show individual CPUs like:
:Tasks: 74 total, 3 running, 71 sleeping, 0 stopped, 0 zombie
: Cpu0 : 95.5% user, 4.2% system, 0.0% nice, 0.3% idle, 0.0% IO-wait
: Cpu1 : 95.5% user, 3.2% system, 0.0% nice, 1.3% idle, 0.0% IO-wait
:I didn't see an option or doc in manpage for DragonFly's top(1).
:I see NetBSD's manpage says: "On multi-processor systems, the STATE field
:may be followed by a slash and cpu number."
:Any tool to show the individual cpu usage?
:(I didn't try pkgsrc/sysutils/top since not ported to DragonFly yet.)
:Please CC me on replies.
: Jeremy C. Reed
: BSD News, BSD tutorials, BSD links
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!
<dillon at xxxxxxxxxxxxx>
More information about the Users