Wednesday, October 01, 2008

Sar utility on Linux/Unix

At Yahoo! I was using something called Ysar to get the historical system resource performances.

For others the same utility is called sar.
For more about this utility check this link

Installing it using Yum

root#yum install sysstat

than initialize the sar by running

root#/usr/sbin/sa

Wait for sometime(20 mins) and check that you have done things correctly.
root#sar -A

you will see the output like


08:40:01 AM proc/s
08:50:01 AM 0.17
Average: 0.17

08:40:01 AM cswch/s
08:50:01 AM 3364.52
Average: 3364.52

08:40:01 AM CPU %user %nice %system %iowait %steal %idle
08:50:01 AM all 4.66 0.00 1.55 12.26 0.00 81.53
08:50:01 AM 0 0.22 0.00 0.22 0.21 0.00 99.35
08:50:01 AM 1 0.10 0.00 0.07 0.22 0.00 99.61
08:50:01 AM 2 3.86 0.00 1.23 37.90 0.00 57.01
08:50:01 AM 3 14.44 0.00 4.69 10.71 0.00 70.16
Average: all 4.66 0.00 1.55 12.26 0.00 81.53
Average: 0 0.22 0.00 0.22 0.21 0.00 99.35
Average: 1 0.10 0.00 0.07 0.22 0.00 99.61
Average: 2 3.86 0.00 1.23 37.90 0.00 57.01
Average: 3 14.44 0.00 4.69 10.71 0.00 70.16

08:40:01 AM INTR intr/s
08:50:01 AM sum 3869.91
Average: sum 3869.91

08:40:01 AM CPU i000/s i001/s i008/s i009/s i012/s i050/s i066/s i074/s i217/s i225/s i233/s
08:50:01 AM 0 1000.27 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
08:50:01 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 112.25 0.00 0.00 0.00
08:50:01 AM 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 92.54
08:50:01 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 2664.85 0.00 0.00 0.00 0.00
Average: 0 1000.27 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Average: 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 112.25 0.00 0.00 0.00
Average: 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 92.54
Average: 3 0.00 0.00 0.00 0.00 0.00 0.00 2664.85 0.00 0.00 0.00 0.00
..... and lot more.

2 comments:

SmartKid said...

Top is pretty good.

http://www.linuxforums.org/misc/using_top_more_efficiently.html

Logical softTech said...


hey, very nice site. thanks for sharing post
figaro olives

Dry Fruit