(866) 366-3640 - support@sagonet.com
Sago Logo
Banner

   
Log in / create account Page Discussion History Go to the site toolbox
System Reporting - sar

Contents


Installing and Configuring sar

sar and iostat and part of the sysstat package. I believe it is installed by default in CentOS 5.

Install sar: yum install sysstat

Scripts are in /etc/cron.d

And also edit [/etc/sysconfig]# cat sysstat

# How long to keep log files (days), maximum is a month, default is 7
HISTORY=15




Basic use from shell: sar -A 1

sar -n DEV #gives network device stats

sar -n EDEV #gives network device errors


To read data from the log use:

sar -f /var/log/sa/sa08 (where 08 is day number to view)

(this same command can be executed from ksar remotely.)


Note: sar can also be used to monitor processes, but can't log the results by default, however I think you could pipe it to a log manually.


Some additional sites on sar

http://www.linux.com/articles/114224

http://sourceforge.net/project/showfiles.php?group_id=179805

kSar

New beta 4.0.10:

webstart : http://ksar.atomique.net/Dev/kSar.jnlp - NICE

jar : http://ksar.atomique.net/Dev/kSar-4.0.10.jar

or wget http://downloads.sourceforge.net/ksar/kSar-4.0.10.jar?modtime=1189451880&big_mirror=0

This is a pretty killer app - you can poll all the data sar has logged, view it in very pretty graphs and also export it (only the sections you want) as a .pdf file.

The development site for kSar is: http://ksar.atomique.net/

To run the Java client: java -jar kSar-4.0.10.jar

To connect to a remote host select "launch SSH command" from the data menu. Connect as: root@ipaddress:port

Once connected via ssh, select "launch ssh command" again using:

ssh command to run: sar -A -f /var/log/sysstat/sa15 (where 15 is the day number to view)

Your path maybe: sar -A -f /var/log/sa/sa15 - just see where your sar logs are stored.