Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sar(1) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sar(1M)



sar(1)                           DG/UX 5.4.2                          sar(1)


NAME
       sar - system activity reporter

SYNOPSIS
       sar [-ubdycwaqvmprA] [-o file] t [n]

       sar [-ubdycwaqvmprA] [-s time] [-e time] [-i sec] [-f file]

DESCRIPTION
       The first case of sar samples cumulative activity counters in the
       operating system at n intervals of t seconds.  If you specify the -o
       option, sar writes complete samples to file (in binary format) in
       addition to displaying them on the screen.  The default value for n
       is 1.

       In the second instance, with no sampling interval specified, sar
       extracts data from a previously recorded file, either the one
       specified by the -f option or, by default, the standard system
       activity daily data file /usr/adm/sa/sadd for the current day dd.

       The starting and ending times of the report can be bounded via the -s
       and -e time arguments of the form hh[:mm[:ss]]. The -i option selects
       records at sec second intervals.  Otherwise, all intervals found in
       the data file are reported.

       In either case, subsets of data to be printed are specified by the
       following options.  Column headings that end in "/s" indicate an
       average rate per second over the interval (see NOTES, below).  The
       default reporting option is -u if no others are specified.


       -a   Report use of file access system routines:
            iget/s              number of inode entry searches per second
                                (local files only);
            namei/s             number of pathname searches per second;
            dirblk/s            number of reads per second associated with
                                buffering a portion of a directory file
                                (local files only).

       -b   Report buffer activity:
            bread/s, bwrit/s    average transfers per second of data between
                                system buffers and disk or other block
                                devices;
            lread/s, lwrit/s    average accesses per second of system
                                buffers;
            %rcache             read cache hit ratio, i.e., the fraction of
                                the number of logical reads which were found
                                in the buffer cache (100% minus the ratio of
                                bread/s to lread/s).  This number is skewed
                                due to the read-aheads performed by the
                                operating system, which are counted in the
                                bread value;
            %wcache             write cache hit ratio, i.e., the fraction of
                                the number of logical writes which were



Licensed material--property of copyright holder(s)                         1




sar(1)                           DG/UX 5.4.2                          sar(1)


                                found in the buffer cache (100% minus the
                                ratio of bwrit/s to lwrit/s);
            pread/s, pwrit/s    average operations per second via raw
                                (physical) device mechanism.

       -c   Report system calls:
            scall/s             system calls per second of all types;
            sread/s, swrit/s, fork/s, exec/s
                                specific system calls per second;
            rchar/s, wchar/s    characters transferred per second by read
                                and write system calls.

       -d   Report activity for each disk drive.  When data is displayed,
            the device specification (e.g., sd(insc@E(FFF8A000),0,0))
            represents a physical disk drive.
            %busy               portion of time device was busy servicing a
                                transfer request;
            avque               average number of requests outstanding and
                                being serviced during that time (measured
                                only when the disk is busy);
            r+w/s, blks/s       number of data transfers per second from or
                                to devices, and number of 512-byte blocks
                                transferred per second;
            avwait              average time in milliseconds that a transfer
                                request waits idly on the queue;
            avserv              average time in milliseconds for a transfer
                                request to be completed (which for disks
                                includes seek rotational latency and data
                                transfer times).

       -m   Report message and semaphore activities:
            msg/s, sema/s       msgsnd(2) and semop(2) system calls issued
                                per second.

       -p   Report paging activities:
            vflt/s              address translation page faults per second
                                (valid page not in memory);
            pflt/s              page faults per second from protection
                                errors (illegal access to page) or "copy-on-
                                writes";
            pgfil/s             page faults per second satisfied by reading
                                pages from program files;
            rclm/s              valid pages reclaimed per second for the
                                free list.

       -q   Report average queue length while occupied, and percentage of
            time occupied:
            runq-sz             number of bound and runnable processes;
            swpq-sz             number of unbound runnable processes (the
                                smaller this number, the better);
            %runocc, %swpocc    instantaneous snapshots of whether the queue
                                is occupied or not, 0% indicates not
                                occupied, 100% indicates occupied.




Licensed material--property of copyright holder(s)                         2




sar(1)                           DG/UX 5.4.2                          sar(1)


       -r   Report unused memory pages and disk blocks:
            freemem             the number of pages available to user
                                processes (see getpagesize(2));
            freeswp             the number of 512-byte blocks of anonymous
                                memory, which includes swap space, not yet
                                allocated.  This number is computed from the
                                difference between total anonymous pages,
                                which includes pages on a swap device and
                                main memory, and reserved anonymous pages.
                                Requests to allocate more swap space will
                                fail if they attempt to allocate more than
                                this number indicates is available.

       -u   Report CPU usage.
            %usr, %sys, %idle   portion of CPU time running in user mode,
                                running in system mode, and otherwise idle.

       -v   Report status of text, process, inode and file tables:
            proc-sz, inod-sz, file-sz, lock-sz
                                the number of entries used/allocated for the
                                process table, the inode table, the file
                                table, and the shared memory record table,
                                evaluated once at the sampling point.
                                Entries in the inode table, file table, and
                                shared memory record table are allocated
                                dynamically, so the number of entries in use
                                is the same as the number of entries
                                allocated;
            ov                  overflows occurring between sampling points.

       -w   Report swapping and switching activity:
            swpin/s             the number of processes bound per second;
            bswin/s             the number of page faults per second
                                associated with user address space;
            swpot/s             the number of processes unbound per second;
            bswot/s             the number of pages that belonged to bound
                                processes reclaimed per second;
            pswch/s             process switches per second.

       -y   Report TTY device activity:
            rawch/s, canch/s, outch/s
                                raw mode input character rate, input
                                character rate processed by canon (see
                                termio(7) and tty(7)), and output character
                                rate;
            rcvin/s, xmtin/s, mdmin/s
                                receive, transmit and modem interrupt rates.

       -A   Report all data.  This supersedes all other options and is
            equivalent to -udqbwcayvmpr.

       Restart entries, indicated by

            dgux restarts



Licensed material--property of copyright holder(s)                         3




sar(1)                           DG/UX 5.4.2                          sar(1)


       in the output, mark times when the system was rebooted (or the run
       level changed) and system activity counters reset to zero.

EXAMPLES
       $ sar
       dgux sys23 4.30 14.5 AViiON    06/08/90

       00:00:05    %usr    %sys   %idle
       01:00:04       3       2      95
       02:00:04       3       2      94
       03:00:04       3       2      96
       04:00:04       3       2      96
       05:00:03       3       2      96
       06:00:04       3       2      96
       07:00:04       3       2      96

       Average        3       2      95
       $

       The system activity reporter, sar, will display cumulative activity
       statistics.  In the above example, sar reports CPU usage from the
       standard system activity daily file for the current day.

       $ sar -c
       dgux sys23 4.30 14.5 AViiON    06/08/90

       00:00:05 scall/s sread/s swrit/s  fork/s  exec/s rchar/s wchar/s
       01:00:04       4       0       0     0.1     0.0       0       0
       02:00:04       4       0       0     0.0     0.0       0       0
       03:00:04       3       0       0     0.1     0.0       0       0
       04:00:04       3       0       0     0.1     0.0       0       0
       05:00:03       3       0       0     0.1     0.0       0       0
       06:00:04       3       0       0     0.1     0.0       0       0
       07:00:04       3       0       0     0.1     0.0       0       0

       Average        3       0       0     0.1     0.0       0       0
       $

       In this example, sar reports system call usage from the standard
       system activity daily file for the current day.


       $ sar -q
       dgux sys23 4.30 14.5 AViiON    06/08/90

       00:00:05 runq-sz %runocc swpq-sz %swpocc
       01:00:04     1.0     100     1.0     100
       02:00:04     1.0     100     1.0     100
       03:00:04     1.0     100     1.0     100
       04:00:04     1.0     100     1.0     100
       05:00:03     1.0     100     1.0     100
       06:00:04     1.0     100     1.0     100
       07:00:04     1.0     100     1.0     100




Licensed material--property of copyright holder(s)                         4




sar(1)                           DG/UX 5.4.2                          sar(1)


       Average      1.0     100     1.0     100
       $

       In this example, sar reports average queue length while occupied, and
       whether the queue is occupied or not at the time of the sample.


       $ sar -v
       dgux sys23 4.30 14.5 AViiON    06/08/90

       00:00:05 proc-sz ov inod-sz ov file-sz ov lock-sz
       01:00:04  69/256  0 240/240  0 102/102  0   0/  0
       02:00:04  69/256  0 240/240  0 102/102  0   0/  0
       03:00:04  69/256  0 242/242  0 102/102  0   0/  0
       04:00:04  69/256  0 240/240  0 102/102  0   0/  0
       05:00:03  69/256  0 240/240  0 102/102  0   0/  0
       06:00:04  69/256  0 240/240  0 102/102  0   0/  0
       07:00:04  69/256  0 240/240  0 102/102  0   0/  0
       $

       In this example, sar reports on the process, inode, file, and shared
       memory lock tables: the size of each table and overflows occurring
       between sampling points.

       To watch CPU activity evolve for 10 minutes, simultaneously saving
       data to a file named temp:

            sar -o temp 60 10

       To review disk activity recorded in file temp:

            sar -d -f temp

FILES
       /usr/adm/sa/sadd    daily data file, where dd are digits representing
                           the day of the month.
       /usr/lib/sa/sadc    data collection program.

NOTES
       A sampling interval of less than 5 seconds is discouraged, for then
       the activity of sar itself may affect the sample.

       Using sar with no sampling interval, causing it to read from a named
       file or the default daily file, presumes that something has been done
       to collect data in that file.  Otherwise, only the restart entries
       will be displayed.

       By reporting rates per second, sar smooths bursts of extreme activity
       and inactivity.  For example, if a burst of 20 characters of output
       occurs within a one-second sample on an otherwise idle machine, sar
       will report an output character rate of 20 characters per second.  If
       that same activity occurred within a ten-second sample, sar would
       report a rate of 2 characters per second.




Licensed material--property of copyright holder(s)                         5




sar(1)                           DG/UX 5.4.2                          sar(1)


BUGS
       If more than one reporting option is specified, the headers are
       printed all together and the output may be difficult to read.

       sar cannot be used to report from data files collected on systems
       that are not running the DG/UX System.  The versions of sar and sadc
       released prior to DG/UX 4.30 are incompatible with later releases.

SEE ALSO
       sar(1M).















































Licensed material--property of copyright holder(s)                         6


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