Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

crontab(1)

sar(1)

timex(1)

sar(1M)                                                             sar(1M)

NAME
     sar: sa1, sa2, sadc - system activity report package

SYNOPSIS
     /usr/lib/sa/sadc [t n] [ofile]

     /usr/lib/sa/sa1 [t n]

     /usr/lib/sa/sa2 [options] [-s time] [-e time] [-i sec]

DESCRIPTION
     System activity data can be accessed at the special request of a user
     [see sar(1)] and automatically, on a routine basis, as described here.
     The operating system contains several counters that are incremented as
     various system actions occur. These include counters for CPU utiliza-
     tion, buffer usage, disk and tape I/O activity, TTY device activity,
     switching and system-call activity, file access, queue activity,
     interprocess communications, paging, and Remote File Sharing.

     sadc and two shell procedures, sa1 and sa2, are used to sample, save,
     and process this data.

     sadc, the data collector, samples system data n times, with an inter-
     val of t seconds between samples, and writes in binary format to ofile
     or to standard output. The sampling interval t should be greater than
     5 seconds; otherwise, the activity of sadc itself may affect the sam-
     ple. If t and n are omitted, a special record is written. This facil-
     ity is used at system boot time, when booting to a multiuser state, 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 "/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 inter-
     val of t seconds, or once if omitted. The following entries in
     /var/spool/cron/crontabs/sys will produce records every 20 minutes
     during working hours and hourly otherwise:

          0 * * * 0-6 /usr/lib/sa/sa1
          20,40 8-17 * * 1-5 /usr/lib/sa/sa1

     See crontab(1) for details.










Page 1                       Reliant UNIX 5.44                Printed 11/98

sar(1M)                                                             sar(1M)

     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(1). The fol-
     lowing entry in /var/spool/cron/crontabs/sys will report important
     activities hourly during the working day:

          5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

     The structure of the binary daily data file is:

     struct sa {
       /* all per-cpu statistics */
       struct  sysinfo si[NCPU];   /* defined in /usr/include/sys/sysinfo.h */
       struct  minfo   mi[NCPU];   /* defined in /usr/include/sys/sysinfo.h */
       struct  vminfo vmi[NCPU];
       struct  ufsstatistics ufs[NCPU];     /* new mips ufs-statistics */

       rfsrvinfot   rfsrv;
       fsinfot        rfsin;
       fsinfot        rfsout;
       rfcinfot      rfc;

       struct kmeminfo km;

       int     minserve;
       int     maxserve;
       int     szinode;   /* current size of inode table */
       uint    szfile;    /* current size of file table */
       uint    szproc;    /* current size of proc table */
       int     szlckf;    /* current size of file record header table */
       int     szlckr;    /* current size of file record lock table */
       int     mszinode;  /* maximum size of inode table */
       int     mszfile;   /* maximum size of file table */
       int     mszproc;   /* maximum size of proc table */
       int     mszlckf;   /* maximum size of file record header table */
       int     mszlckr;   /* maximum size of file record lock table */
       long    inodeovf;  /* cumulative overflows of inode table since boot */
       long    fileovf;   /* cumulative overflows of file table since boot */
       long    procovf;   /* cumulative overflows of proc table since boot */
       timet  ts;        /* time stamp */

       int apstate;

       struct shlbinfo shlb;           /* shared lib info */
       struct rtminfo  rt;
       struct syswait swt;
       struct devsar *devio; /* device unit information */
       int     deviosz;       /* size of device unit information structure */







Page 2                       Reliant UNIX 5.44                Printed 11/98

sar(1M)                                                             sar(1M)

     #define IOOPS  0  /* number of I /O requests since boot */
     #define IOBCNT 1  /* number of blocks transferred since boot */
     #define IOACT  2  /* cumulative time in ticks when drive is active */
     #define IORESP 3  /* cumulative I/O response time in ticks since boot */
     };

FILES
     /var/adm/sa/sadd         daily data file

     /var/adm/sa/sardd        daily report file

     /tmp/sa.adrfl            address file

SEE ALSO
     crontab(1), sar(1), timex(1).







































Page 3                       Reliant UNIX 5.44                Printed 11/98

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