cancel
Showing results for 
Search instead for 
Did you mean: 

Sar and sysstat

 
Desaes
Occasional Visitor

Sar and sysstat

Hello!

 

I'm seeing a big difference in sar and other tools output:

 

[root@xxx /opt/perf]# sar -u 1 100

HP-UX xxx B.11.31 U ia64 09/21/15

10:19:13 %usr %sys %wio %idle
10:19:14 7 1 44 47
10:19:15 7 1 45 47
10:19:16 8 0 46 47
10:19:17 7 1 47 43
10:19:18 8 1 46 45
10:19:19 7 1 48 45
10:19:20 7 1 47 46
10:19:21 9 1 48 42

 

[root@xxx /opt/perf]# vmstat 1 100
procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
4 41 0 5462030 69688205 0 0 5 0 0 0 2 132068 520080 13552 3 4 93
7 44 0 5647427 69694114 0 0 0 0 0 0 0 72429 647027 28506 8 2 90
7 44 0 5647427 69693232 0 0 0 0 0 0 0 73995 660449 28919 6 1 93
7 44 0 5647427 69693223 0 0 0 0 0 0 0 75840 678034 29388 7 2 91
7 44 0 5647427 69690105 0 0 0 0 0 0 0 75848 696993 29104 5 2 93

 

Using sar, I'm seeing a lot of wait for i/o but in vmstat, I'm seeing a lot of idle. Glance shows information similar to vmstat.

 

Who is saying the truth?

 

Regards. 

 

1 REPLY
Patrick Wallek
Honored Contributor

Re: Sar and sysstat

Your 'sar' output is essentially just a bit more granular in what it is reporting than sysstat or glance.

 

With sysstat and glance the %WIO (waiting on I/O) is included in the regular idle percentage.

 

If you were to run sysstat and 'sar -u' at the same time you would likely see that the idle percentage that sysstat reports is the same the sum of %wio and %idle from 'sar -u'.

 

%wio is likely included with idle becuase the process is not really doing anything except waiting on an I/O of some sort which does not take any CPU cycles.