Red Hat sysstat service

April 17, 2008 at 10:11 am Leave a comment

While tools like vmstat, top, free allow us to gain insight into system performance they offer little help if to monitor various system statistics over longer period of time.

This is why Red Hat includes systat service that allows administrators to monitor system performance.

Sysstat includes the following tools:

– mptstat – to monitor CPU
– iostat – to monitor disk usage
– sadc – system activity data collector.
– sar – collect, report, or save system activity information.

How long logs should be kept on the system (default is 7 days). This is adjustable parameter and can be changed in /etc/sysconfig/sysstat file

How often data is collected?

By default the statistics are collected every 10 minutes but it can be customized in /etc/cron.d/sysstat file. Additionally daily summary of process accounting is generated.

Content of /etc/cron.d/sysstat file:

# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A

You could change the first line to the as follows to probe system every minute:

*/1 * * * * root /usr/lib/sa/sa1 1 1

Once a minute is probably a little bit excessive. I would suggest leaving default setting (every 10 min) and only change it to probe more often if specific issue has to be troubleshooted on a server.

How to read the data?

To retrieve statistics:
sar -u – CPU utilization
sar -b – report I/O and transfer rate statistics
sar -w – swap usage
sar -q – system load
sar -R – memory statistics
sar -B – kernel paging performance
sar -n ALL – report network statistics
sar -n EDEV – report network errors
sar -v – report status of inode, file and other kernel tables

Where are the disk usage statistics?

Default configuration does not probe for disk usage statistics. Monitoring disk I/O usage will increase significantly amount of data stored in logfiles generated by sysstat. To enable it edit the lines in /usr/lib/sa/sa1:

exec ${ENDIR}/sadc -F -L 1 1 –
exec ${ENDIR}/sadc -F -L $* –


exec ${ENDIR}/sadc -F -d -L 1 1 –
exec ${ENDIR}/sadc -F -d -L $* –

Once disk usage monitoring is enabled. Statistics can be displayed with the following command:

sar -d -p

What about reading older data?

For older reports we can extract data from filename:

sar -p -f /var/log/sa/sa14
(where sa14 file contains statistics for 14th day of the month ex. Apr 14)


Entry filed under: Red Hat. Tags: , , , , .

Business Week – February 5 1996 Randy Pausch

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Recent Posts


%d bloggers like this: