Friday, March 20, 2009

sar system monitoring tool in Fedora

sar is powerful system monitoring tool but not so easy to configure.
in Fedora you can find it in sysstat package. to install it as root: yum install sysstat

to initialize it, launch as root these commands: /usr/lib/sa/sa1 1 1 and /usr/lib/sa/sa2 -A
now you'll have in /etc/cron.d/sysstat the following commands:

# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 -d 1 1
# 0 * * * * root /usr/lib/sa/sa1 -d 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A

The sa1 script collects and stores binary data in the system activity daily data file, and sa2 writes a daily report in the /var/log/sa/ directory.

No comments: