# #ident "@(#)sa:README 1.8" #ident "$Header: /proj/irix6.5.7m/isms/eoe/cmd/sa/RCS/README,v 1.4 1996/05/09 05:01:22 kanoj Exp $" README 1.8 of 10/4/85 Instruction of daily report generation: 1. Enter su sys -c "/usr/lib/sa/sadc /usr/adm/sa/sa`date +%d`" in /etc/rc in state 2 under "$2" = 0, i.e., sadc is executed only for the first transition into state 2. This entry causes a special record to be written on the daily data file when UNIX restarts. 2. The execution of shell script sa1 [t n] causes data collection program to write system activity counters n times at every t-second interval on data file. If t and n are not specified, it writes data once. According to your installation's requirement, enter entries of executing sa1 [t n] in /usr/lib/crontab to collect system activity data. For example, entries 0 8-17 * * 1-5 su sys -c /usr/lib/sa/sa1 1200 3 &" and 0 18-23 * * 1-5 su sys -c "/usr/lib/sa/sa1 &" cause data collection program to be activated at every hour on the hour from 8:00 to 23:00 on weekdays. Moreover, It writes data on data file 3 times at every 20 minutes interval from 8:00 to 17:00 and once at other times. 3. Shell procedure sa2 will invoke sar command to generate the daily report from the data file. Its usage is sa2 [-options] [-s hh:mm] [-e hh:mm] [-i ss] where -s and -e specify the report starting and ending times respectively, -i specifies the report data interval in seconds. If they are not specified, all data from the data file are to be reported. -options are report options, see manual page sar.1 for description. Make an entry to execute sa2 in /usr/lib/crontab. For instance, entry 5 18 * * 1-5 su adm -c "/usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 3600 -ubd &" causes the invocation of sar command at 18:05. It generates the daily report that includes the hourly cpu utilization, buffer usage and disk and tape activities from 8:00 to 18:01. Notes on sadc/sar record formats (from kanoj@sgi.com): Till 6.2, sadc would write the foll. fields in the sa file that sar reads: 1. A tblmap[] array, whose first element gave the # disks in the system, which was assumed not to change ever. 2. An sa structure written at system startup time (specially marked as a restart record). 3. A super record consisting of an sa structure followed by the sgidio structure for each disk in the system. This super records were written at each invocation of sadc while the system was running. Since the number of disks was assumed invariant on the system, this super record size was also assumed invariant. From ficus/kudzu, I changed this to take into account the variability of disk configuration on systems. The sa file now consists of: 1. An sa structure written at system startup time (specially marked as a restart record). These sa structures contain the number of disks in the system at the point of sadc invocation. 2. A super record consisting of an sa structure followed by the sgidio structure for each disk in the system at that point.