SAR(8) — UNIX 3.0
NAME
sar − system activity report package
DESCRIPTION
Sar is the first (tentative) piece of an overall UNIX measurement and statistics package; the data that are collected and the output formats are not yet final.
The operating system contains a number of counters that are incremented as various system actions occur. These include several time counters (that are incremented each 60th of a second depending on the CPU mode), I/O activity counters, switching and system-call counters, and file-access counters. The system activity package writes system activity parameters periodically on a binary file. It also generates a daily system activity report that covers the prime period (from 8:00 to 18:00).
The data collection and report generation are controlled by entries in crontab (see cron(1M)). The data collection program is normally activated every hour on the hour; the report generation once a day.
Every time the system is booted, a special record is written to the daily data file, since all the system activity counters restart from zero at that time. This process is done while executing /etc/rc see (init(8)) during UNIX initialization. It produces an entry on the daily report showing the restart time.
The daily reports are deposited in /usr/adm/sa/sardd where dd are digits representing the day of the month. A report can be printed (e.g., cat /usr/adm/sa/sar05) any time before it is removed the following week.
The structure of the binary daily data file is:
struct sa {
struct sysinfo si;/∗ defined in /usr/include/sys/sysinfo.h ∗/
long d0;/∗ number of reads and writes of disk 0 ∗/
long d1;/∗ number of reads and writes of disk 1 ∗/
long d2;/∗ number of reads and writes of disk 2 ∗/
long ts;/∗ time stamp in time_t format ∗/
};
FILES
/usr/adm/sa/sadd daily data file
/usr/adm/sa/sardd daily report file
/tmp/sa.adrfl address file
May 16, 1980