Thursday 7 August 2008

Sysstat linux package - sar sa1 sa2 sadc

For SUSE I installed these packages before installing sysstat
rpm -ivh libgcj-3.3.3-43.24.i586.rpm
rpm -ivh plotutils-2.4.1-575.1.i586.rpm
rpm -ivh gettext-0.14.1-30.1.i586.rpm
rpm -ivh sysstat-5.0.1-35.1.i586.rpm
rpm -ivh gnuplot-3.7.3-256.1.i586.rpm

sysstat-8.1.2-4.1.i586.rpm

I took some time for me to find cron job location
/etc/cron.d/sysstat
#crontab for sysstat

#activity reports every 10 minutes everyday
-*/10 * * * * root /usr/lib/sa/sa1

#update reports every 6 hours
0 */6 * * * root /usr/lib/sa/sa2 -A

You can check reports via sar command. If you want to be sure that cron wor
sar -f /var/log/sa/sa07
Last two digit depends on day of month

You can find configuration file under /etc/sysstat
ls /etc/sysstat
sysstat sysstat.cron sysstat.ioconf

2 comments:

jz said...

do you know a method to clean up /var/log/sa?

Tlepsh said...

From man sa2
To run the sa2 command daily, place the following entry in your root or adm crontab file:
5 19 * * 1-5 /usr/lib/sa/sa2 -A &
This will generate a daily report called /var/log/sa/sardd It will also remove reports more than one week old.

I hope this is what you are looking for.