/usr/lib/sa/sa1 [t n]
/usr/lib/sa/sa2 [-P processor_id[, . . . ] | ALL] [-ubdycwaqvmpgrkAR]
[-s time] [-e time] [-i sec]
sadc and two shell procedures, sa1 and sa2, are used to sample, save, and process this data.
the data collector,
samples system data
times, with an interval of
between samples, and writes in binary format to
or to standard output.
The sampling interval t should be greater than 5 seconds;
otherwise, the activity of
itself may affect the sample.
a special record is written.
This facility is used at system boot time, when booting to a
to mark the time at which the counters restart from zero.
For example, the /etc/init.d/perf file writes the
restart mark to the daily data by the command entry:
su sys -c "$TFADMIN /usr/lib/sa/sadc /var/adm/sa/sa`date +%d`"
The shell script sa1, a variant of sadc, is used to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day. The arguments t and n cause records to be written n times at an interval of t seconds, or once if omitted. The following entries in /var/spool/cron/crontabs/sys produce records every 20 minutes during working hours and hourly otherwise:
0 * * * 0-6 $TFADMIN /usr/lib/sa/sa1 20,40 8-17 * * 1-5 $TFADMIN /usr/lib/sa/sa1See crontab(1) for details.
The shell script sa2, a variant of sar, writes a daily report in the file /var/adm/sa/sardd. The options are explained in sar(1M). The following entry in /var/spool/cron/crontabs/sys reports important activities hourly during the working day:
5 18 * * 1-5 $TFADMIN /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A