Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sa2(1M) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sag(1G)

sar(1)

timex(1)

cron(1M)




sadc(1M) sadc(1M)
NAME sadc, sa1, sa2 - system activity report package SYNOPSIS /usr/lib/sa/sadc [t n] [file] /usr/lib/sa/sa1 [t n] /usr/lib/sa/sa2 [-u] [-b] [-y] [-c] [-w] [-a] [-q] [-v] [-m] [-A] [-stime] [-etime] [-isec] DESCRIPTION System activity data can be accessed at the special request of a user (see sar(1)) or automatically, on a routine basis as described here. The operating system contains a number of counters that are incremented as various system actions occur. These include counters for CPU utilization, buffer usage, disk and tape I/O activity, TTY device activity, switching and system-call, file-access, queue activity, and counters for interprocess communications. sadc and the shell procedures sa1 and sa2 are used to sam- ple, save, and process this data. sadc, the data collector, samples system data n times every t seconds and writes in binary format to file or to standard output. If t and n are omitted, a special record is writ- ten. This facility is used at system boot time to mark the time at which the counters restart from zero. The /etc/rc entry su adm -c "/usr/lib/sa/sadc /usr/adm/sa/da`date +%d`" writes the special record to the daily data file to mark the system restart. The shell script sa1, a variant of sadc, is used to collect and store data in binary file /usr/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 only once, if omitted. The entries in crontab (see cron(1M)) 0 * * * 0,6 /usr/lib/sa/sa1 0 8-17 * * 1-5 /usr/lib/sa/sa1 1200 3 0 18-7 * * 1-5 /usr/lib/sa/sa1 will produce records every 20 minutes during working hours and hourly otherwise. The shell script sa2, a variant of sar(1), writes a daily report in the file /usr/adm/sa/sardd. The flag options are explained in sar(1). The crontab entry 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 3600 -A April, 1990 1



sadc(1M) sadc(1M)
will compile a single report at 6:05 P.M. of each working day giving an hourly summary of all activity in the interval 8:00 A.M. to 6:01 P.M. The structure of the binary daily data file is struct sa { struct sysinfo si; /* defined in /usr/include/sys/sysinfo.h */ int szinode; /* current size of inode table */ int szfile; /* current size of file table */ int sztext; /* current size of text table */ int szproc; /* current size of proc table */ int mszinode; /* maximum size of inode table */ int mszfile; /* maximum size of file table */ int msztext; /* maximum size of text table */ int mszproc; /* maximum size of proc table */ long inodeovf; /* cumulative overflows of inode table since boot */ long fileovf; /* cumulative overflows of file table since boot */ long textovf; /* cumulative overflows of text table since boot */ long procovf; /* cumulative overflows of proc table since boot */ time_t ts; /* time stamp */ long devio[NDEVS][4]; /* device unit information */ #define IO_OPS 0 /* number of I/O requests since boot */ #define IO_BCNT 1 /* number of blocks transferred since boot */ #define IO_ACT 2 /* cumulative time in ticks when drive is active */ #define IO_RESP 3 /* cumulative I/O response time in ticks since boot */ }; FILES /usr/lib/sa/sadc /usr/lib/sa/sa1 /usr/lib/sa/sa2 /usr/adm/sa/sadd daily data file /usr/adm/sa/sardd daily report file /tmp/sa.adrfl address file 2 April, 1990



sadc(1M) sadc(1M)
SEE ALSO sag(1G), sar(1), timex(1), cron(1M). ``System Activity Package'' in A/UX Local System Administra- tion. April, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026