sar(8)sar(8)NAME
sar: sa1, sa2, sadc - System activity report package
SYNOPSIS
/usr/opt/svr4/usr/lib/sa/sadc [tn] [file]
/usr/opt/svr4/usr/lib/sa/sa1 [tn]
/usr/opt/svr4/usr/lib/sa/sa2 [-Pprocessor-id] [-ubdycaqvmpgrkA] [-s
time] [-e time] [-isec]
OPTIONS
The options, -ubdycaqvmpgrkA, are the same as for sar; see sar(1) for
further information.
OPERANDS
Is the name of the file that will capture the report output. Indicates
the number of intervals during which sampling will take place. Indi‐
cates the duration in seconds for each sampling. The value for t should
be 5 or greater.
DESCRIPTION
The operating system contains counters for: CPU utilization Buffer use
Disk and tape I/O activity Terminal (TTY) activity System call activity
File access activity Queue activity Inter-process communications Paging
As these activities occur, the appropriate counters are incremented.
A user can access system activity data through the sar utility. The
same information can be accessed automatically on a routine basis.
The system activity data collector, sadc, and two shell scripts, sa1
and sa2, sample, save, and process this data. The sa1 and sa2 shell
scripts are variants of sadc.
The sadc shell script samples system data n times, in intervals of t
seconds between samples. It produces a report to standard output by
default or in binary format to a specified file.
If the sampling interval t is 5 seconds or less, sadc's own activity
may affect the sample.
Omitting the t and n parameters causes sadc to produce a special
record. This is used at system boot time, when booting to a multiuser
state, to mark the time when the counters restart from zero.
The sa1 shell script collects and stores data in a binary file named
/var/adm/sa/sadd, where dd is the current day of the month.
The arguments t and n specify that sa1 record the data n times at
intervals of t seconds. If omitted, the data is only written once.
The sa2 shell script writes a daily report in a file named
/var/adm/sa/sardd. where dd is the current day of the month.
You can use sa2 within a crontab.
EXAMPLES
The following entry in /sbin/init.d/perf writes the restart mark to
the daily data file.
su sys -c "/usr/opt/svr4/usr/lib/sa/sadc /var/adm/sa/sa`date
+%d`" The following entry in /sbin/init.d/perf writes the
restart mark to the daily data file.
su sys -c "/usr/opt/svr4/usr/lib/sa/sadc /var/adm/sa/sa`date
+%d`" The following example shows entries in
/var/spool/cron/crontabs/sys that produce records every twenty
minutes during working hours and hourly otherwise. See
crontab(1) for details.
0 * * * 0-6 /usr/opt/svr4/usr/lib/sa/sa1
20,40 8-17 * * 1-5 /usr/opt/svr4/usr/lib/sa/sa1
resulting display The following example shows entries in
/var/spool/cron/crontabs/sys that reports all important activi‐
ties every twenty minutes during working hours from Monday
through Friday. See crontab(1) for details.
5 18 * * 1-5 /usr/opt/svr4/usr/lib/sa/sa2 -s 8:00 -e
18:01 -i 1200 -A
resulting display
FILES
Daily data file. Daily report file.
SEE ALSO
Commands: crontab(1), sar(1), timex(1)sar(8)