Board index Linux Linux - Commands and Tools

Moderator: chandranjoy

sysstat/sar - How to?

Postby chandranjoy » Thu Dec 16, 2010 6:10 pm

To view load average history on Linux servers:
Install the sysstat package which includes sar:
apt-get install sysstat (in Debian/Ubuntu Servers)
yum install sysstat (Redhat/CentOS Servers)


Then run crontab -e and add the following to collect stats:

# Collect measurements at 10-minute intervals
0,10,20,30,40,50 * * * * /usr/lib/sa/sa1
# Create daily reports and purge old files
0 0 * * * /usr/lib/sa/sa2 -A

You now have access to IO and CPU usage history.

Use this command see the data for the 5th day of the current month:
sar -f /var/log/sysstat/sa05


Or try,
sar -q


Cheers :)
chandranjoy
Site Admin
 
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to Linux - Commands and Tools

Who is online

Users browsing this forum: No registered users and 1 guest


cron