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?

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Dec 2005 01:37:46 -0800 (PST)

: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
: 	  	 	 http://www.bsdnewsletter.com/

    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 

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