Wednesday, August 11, 2010

How to setup SAR in ubuntu 10.04

SAR (collect and report statistics over time)

zodiac@gml-admin:~$ sar

The program 'sar' can be found in the following packages:
* sysstat
* atsar


sudo apt-get install sysstat

sar
Cannot open /var/log/sysstat/sa01: No such file or directory
Please check if data collecting is enabled in /etc/default/sysstat


sudo gedit /etc/default/sysstat

change the line ENABLED="false" to ENABLED="true"

now you can use sar tool

SAR features:-



* displays the same information as procinfo, vmstat and iostat
* can report historical as well as current data
* without options sar command reports cpu utilization at 10 minute intrevals for the day since midnight









* Historic data collection is made possible by sal script, which is a part of sar (or sysstat package) and must be setup
to run from cron at periodic intrevals. sar stores the data it collects in /var/log/sa in binary format

* Todays Disk Activity summary:-

sar -d



















* Network interface statistics:-

sar -n DEV




























* To get all available information :-

sar -A

1 comment: