sar & cpu-utilization graph

Jeff Newman jeffnewman75 at gmail.com
Mon Dec 5 21:37:18 CET 2005


Hi,

My boss wants the cpu-utilization graph to reflect the statistics on a per
cpu basis.
Investigating, I see that sar can do this, while reporting similar data to
vmstat (i.e. User, System Idle, average etc...) with
the addition of a cpu number. Output:

stlqrma:root:/> sar -P ALL 1 2

AIX stlqrma 3 5 00CB5A2F4C00    12/05/05

System configuration: lcpu=16

15:31:05 cpu    %usr    %sys    %wio   %idle   physc
15:31:06  0       35       5       0      60    0.75
          1        0       0       0     100    0.25
          2       36       5       0      59    0.75
          3        0       0       0     100    0.25
<snip>
15:31:07  0       36       7       0      57    0.77
          1        0       0       0     100    0.24
          2       41       5       0      55    0.77
          3        0       0       0     100    0.23
<snip>
Average   0       36       6       0      59    0.76
          1        0       0       0     100    0.24
          2       39       5       0      57    0.76
          3        0       0       0     100    0.24
<snip>

What is the easiest way to change the cpu utilization graph in hobbit to
take advantage
of this? One small obstacle I see is that the sar output is *slightly*
different on say, linux and aix:

# sar -P ALL 1 1
Linux 2.6.9-5.ELsmp (rp-ladmin)         12/05/2005

02:34:00 PM       CPU     %user     %nice   %system   %iowait     %idle
02:34:01 PM       all      0.00      0.00      0.00      0.00    100.00
02:34:01 PM         0      0.00      0.00      0.00      0.00    100.00
02:34:01 PM         1      0.00      0.00      0.00      0.00    100.00

Same data, with the exception of adding "ALL" and spelling out user/system
etc..

It's one of those things that's either more complicated than it looks, or
easier than I think :-)

Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20051205/d1caff89/attachment.html>


More information about the Xymon mailing list