sar(1m)
_________________________________________________________________
sa1, sa2, sadc
system activity report package
_________________________________________________________________
SYNTAX
/usr/lib/sa/sadc [t n] [ofile]
/usr/lib/sa/sa1 [t n]
/usr/lib/sa/sa2 [-ubycaqvmA] [-s time] [-e time] [-i sec]
DESCRIPTION
Sar(1M) accesses system activity data automatically on a routine
basis. Such data can also be accessed at the special request of
a user through sar(1)). The operating system contains a number
of counters that are incremented as various system actions occur.
These include CPU utilization counters, buffer usage counters,
disk and tape I/O activity counters, TTY device activity
counters, switching and system-call counters, file-access
counters, queue activity counters, and counters for inter-process
communications.
Sadc and the shell procedures sa1 and sa2 sample, save, and
process this data.
Sadc, the data collector, samples system data n times every t
seconds and writes in binary format to ofile or to standard
output. If t and n are omitted, a special record is written.
This facility is used at system boot time to mark the time at
which the counters restart from zero. The /etc/init.d/rc.account
entry:
su sys -c "/usr/lib/sa/sadc /usr/adm/sa/sa`date +%d`"
writes the special record to the daily data file to mark the
system restart.
The shell script sa1, a variant of sadc, collects and stores data
in binary file /usr/adm/sa/sadd (dd is the current day). The
arguments t and n write records n times at an interval of t
seconds; the default is to write once. The entries in crontab
(see cron(1M)):
0 * * * 0,6 su sys -c "/usr/lib/sa/sa1"
0 8-17 * * 1-5 su sys -c "/usr/lib/sa/sa1 1200 3"
0 18-7 * * 1-5 su sys -c "/usr/lib/sa/sa1"
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
sar(1m)
produces records every 20 minutes during working hours and hourly
otherwise.
The shell script sa2, a variant of sar(1), writes a daily report
in file /usr/adm/sa/sardd. The options are explained in sar(1).
The crontab entry:
5 18 * * 1-5 su adm -c "/usr/lib/sa/sa2 -s 8:00 -e 18:01 -i
3600 -A"
reports important activities hourly during the working day.
The structure of the binary daily data file (see NOTES below) is:
struct sa {
struct sysinfo si; /* see /usr/include/sys/sysinfo.h */
int szi-node; /* current entries of inode table */
int szfile; /* current entries of file table */
int sztext; /* current entries of text table */
int szproc; /* current entries of proc table */
int mszi-node; /* size of inode table */
int mszfile; /* size of file table */
int msztext; /* size of text table */
int mszproc; /* size of proc table */
long i-nodeovf; /* cumul. overflows of inode table */
long fileovf; /* cumul. overflows of file table */
long textovf; /* cumul. overflows of text table */
long procovf; /* cumul. overflows of proc table */
time_t ts; /* time stamp, seconds */
long devio[NDEVS][4]; /* device info for up to NDEVS units */
#define IO_OPS 0 /* cumul. I/O requests */
#define IO_BCNT 1 /* cumul. blocks transferred */
#define IO_ACT 2 /* cumul. drive busy time in ticks */
#define IO_RESP 3 /* cumul. I/O resp time in ticks */
};
FILES
/usr/adm/sa/sadd Daily data file
/usr/adm/sa/sardd Daily report file
/tmp/sa.adrfl Address file
SEE ALSO
cron(1M), sar(1), timex(1).
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)