SMP CPU Statistics
    David Rhodus 
    sdrhodus at gmail.com
       
    Sun May  1 07:36:15 PDT 2005
    
    
  
On 4/30/05, Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:
>     cpustat as in systat, vmstat, etc....  cpustat is the best name for
>     this, especially if we start incorporating feature such as
>     tracking cpu statistics with the cpu performance registers.
> 
>                                         -Matt
I really like the way this is done on hpux.
e.g. output from top
System: rims                                          Sun May  1 10:14:57 2005
Load averages: 0.27, 0.28, 0.28
203 processes: 186 sleeping, 17 running
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    0.05   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
 1    0.92   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
 2    0.03   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
 3    0.08   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   0.27   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
Memory: 167944K (65824K) real, 287548K (111440K) virtual, 1034976K free  Page# 1
/23
CPU TTY    PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
  3 pts/0 11087 tbailey  154 20  7756K  7852K sleep    1:32  0.85  0.84 rts32
  1 pts/1 11161 connie   154 20  3068K  3164K sleep    0:00  0.67  0.61 rts32
  2 pts/6 11203 connie   154 20  1884K  1976K sleep    0:00  0.71  0.52 rts32
There is an option to show the average of all the cpus as one statistic too.
           -h          Hides the individual CPU state information for
                       systems having multiple processors. Only the average
                       CPU status will be displayed.
e.g. output
System: rims                                          Sun May  1 10:16:50 2005
Load averages: 0.26, 0.27, 0.27
203 processes: 186 sleeping, 17 running
Cpu states: (avg)
  LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0.26   1.0%   0.0%   0.0%  99.0%   0.0%   0.0%   0.0%   0.0%
Memory: 172956K (82936K) real, 292688K (140420K) virtual, 1030224K free  Page# 1
/15
CPU TTY    PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
  0 pts/0 11087 tbailey  154 20  7756K  7852K sleep    1:34  5.83  5.82 rts32
  2 pts/1 11161 connie   154 20  7260K  7356K sleep    0:01  1.82  1.81 rts32
I wonder if someone might consider making these changes to the DFly top.
-DR
    
    
More information about the Users
mailing list