Sysstat-7.0.4

Introduction to Sysstat

The Sysstat package contains utilities to monitor system performance and usage activity. Sysstat contains the sar utility, common to many commercial Unixes, and tools you can schedule via cron to collect and historize performance and activity data.

Package Information

Sysstat Dependencies

Recommended

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sysstat

Installation of Sysstat

Install Sysstat by running the following commands:

make config &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

make config: Runs the interactive configuration process. The first question prompts you for an “Installation directory”. Reply with /usr, as this is equivalent to Autoconf's --prefix=/usr parameter to configure. For all other prompts, you may press Enter to accept the (very sane) defaults. When prompted for “Number of daily data files to keep: [7]”, you may wish to keep a larger number of files.

Configuring Sysstat

Cron Information

To begin gathering Sysstat history information, you must add to, or create a privileged user's crontab. The default history data location is /var/log/sa. The user running Sysstat utilities via cron must have write access to this location.

Below is an example of what to install in the crontab. Adjust the parameters to suit your needs. Use man sa1 and man sa2 for information about the commands.

# 8am-7pm activity reports every 10 minutes during weekdays
0 8-18 * * 1-5 /usr/lib/sa/sa1 600 6 &

# 7pm-8am activity reports every hour during weekdays
0 19-7 * * 1-5 /usr/lib/sa/sa1 &

# Activity reports every hour on Saturday and Sunday
0 * * * 0,6 /usr/lib/sa/sa1 &

# Daily summary prepared at 19:05
5 19 * * * /usr/lib/sa/sa2 -A &

Ensure you submit the revised crontab to the cron daemon.

System Startup Information

At system startup, a LINUX RESTART message must be inserted in the daily data file to reinitialize the kernel counters. This can be automated by installing the /etc/rc.d/init.d/sysstat init script included in the blfs-bootscripts-20080816 package using the following command as the root user:

make install-sysstat

Contents

Installed Programs: iostat, mpstat, sar, sa1, sa2, sadc and sadf
Installed Libraries: None
Installed Directories: /usr/lib/sa, /usr/share/doc/sysstat-7.0.4 and /var/log/sa

Short Descriptions

iostat

reports CPU statistics and input/output statistics for devices and partitions.

mpstat

reports individual or combined processor related statistics.

sar

collects, reports and saves system activity information.

sa1

collects and stores binary data in the system activity daily data file. It is a front end to sadc designed to be run from cron.

sa2

writes a summarized daily activity report. It is a front end to sar designed to be run from cron.

sadc

is the system activity data collector, used as a backend for sar.

sadf

is used for displaying the contents of data files created by the sar command. But unlike sar, sadf can write its data in many different formats.

Last updated on 2007-04-04 14:42:53 -0500