Search For Answers
Tracking resources with sysstat
Last updated: June 09, 2011
Sysstat utilities are a collection of monitoring tools for linux that can be installed through package management software such as yum for CentOS or apt-get on Ubuntu.
CentOS - Install and set to start on boot.
[root@example /]# yum install sysstat -y ; chkconfig sysstat on
[root@example /]# service sysstat start
Ubuntu - Install and set to start on boot.
root@example:~# apt-get install sysstat -y ; update-rc.d sysstat defaults
With Ubuntu you will need to enable the collection of system activity through /etc/default/sysstat by changing ENABLED="false" to ENABLED="true" and then start sysstat.
root@example:~# service sysstat start
The cronjob
By default will run every 10 minutes, but can be modified through /etc/cron.d/sysstat if preferred.
# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
Basic commands
# Load averages including run queue and numproc.
[root@example /]# sar -q
# Memory utilization
[root@example /]# sar -r
# Disk activity, displaying I/O and transfer rate
[root@example /]# sar -b