System information
System Monitoring Utilities 13
the fly or query existing reports gathered by the system activity data collector (sadc).
sar and sadc both gather all their data from the /proc file system.
NOTE: sysstat Package
sar and sadc are part of sysstat package. You need to install the pack-
age either with YaST, or with zypper in sysstat.
2.1.2.1 Automatically Collecting Daily Statistics
With sadc
If you want to monitor your system about a longer period of time, use sadc to au-
tomatically collect the data. You can read this data at any time using sar. To start
sadc, simply run /etc/init.d/boot.sysstat start. This will add a link
to /etc/cron.d/ that calls sadc with the following default configuration:
• All available data will be collected.
• Data is written to /var/log/sa/saDD, where DD stands for the current day. If a
file already exists, it will be archived.
• The summary report is written to /var/log/sa/sarDD, where DD stands for
the current day. Already existing files will be archived.
• Data is collected every ten minutes, a summary report is generated every 6 hours
(see /etc/sysstat/sysstat.cron).
• The data is collected by the /usr/lib64/sa/sa1 script (or /usr/lib/sa/
sa1 on 32-bit systems)
• The summaries are generated by the script /usr/lib64/sa/sa2 (or /usr/
lib/sa/sa2 on 32-bit systems)
If you need to customize the configuration, copy the sa1 and sa2 scripts and adjust
them according to your needs. Replace the link /etc/cron.d/sysstat with a
customized copy of /etc/sysstat/sysstat.cron calling your scripts.
2.1.2.2 Generating reports with sar
To generate reports on the fly, call sar with an interval (seconds) and a count. To
generate reports from files specify a filename with the option -f instead of interval