'\"macro stdmacro
.if n .pH g1.sar @(#)sar	40.10 of 1/8/90
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} sar 1 "System Performance Analysis Utilities" "\&"
.if \nX=1 .ds x} sar 1 "System Performance Analysis Utilities"
.if \nX=2 .ds x} sar 1 "" "\&"
.if \nX=3 .ds x} sar "" "" "\&"
.TH \*(x}
.SH NAME
\f4sar\fP \- system activity reporter
.SH SYNOPSIS
\f4sar
[\| \-ubdycwaqvmpgrkxDSAC\| ]
[\| \-o\0 \f2file\fP\|]
\f2t\fP [ \f2n\fP ]
.PP
\f4sar\fP
[\| \-ubdycwaqvmpgrkxDSAC\| ]
[\| \-s\0 \f2time\fP\|]
[\| \-e\0 \f2time\fP\|]
[\| \-i\0 \f2sec\fP\|]
[\| \-f\0 \f2file\fP\|]
.SH DESCRIPTION
\f4sar\fP
in the first instance,
samples cumulative activity counters in the operating system
at
.I n
intervals of
.I t
seconds, where \f2t\f1 should be 5 or greater.
If \f2t\f1 is specified with more than one option,
all headers are printed together and the output may be difficult to read.
(If the sampling interval is less than 5, the activity of
\f4sar\fP
itself may affect the sample.)
If the
\f4\-o\f1
option is specified, it saves
the samples in
.I file
in binary format.
The default value of
.I n
is 1.
In the second instance, with no sampling interval specified,
\f4sar\f1
extracts data from a previously
recorded
.IR file,
either the one specified
by the
\f4\-f\f1
option
or, by default,
the standard system activity daily data file
\f4/var/adm/sa/sa\f2dd\f1
for the current day
.IR dd.
The starting and ending times of the report
can be bounded via the
\f4\-s\f1
and
\f4\-e\f1
.I time
arguments of the form
.IR hh [: mm [: ss ]].\^
The
\f4\-i\f1
option selects records at
.I sec
second intervals.
Otherwise, all intervals found in the data file are reported.
.PP
In either case,
subsets of data to be printed are specified by option:
.PP
.TP 5
\f4\-u\f1
Report
.SM CPU
utilization (the default):
.br
%usr, %sys, %wio, %idle \- portion of time running in user mode,
running in system mode, idle with some process waiting for block 
.SM I/O,
and otherwise idle.  When used with \f4\-D\f1, %sys is split into
percent of time servicing requests from remote machines 
(%sys remote) and all other system time (%sys local).
If you are using a 3B2 Computer with a co-processor
the CPU utilization (default) report will contain the following
fields:
.br
%usr, %sys, %idle, scall/s \- where scalls/s is the number of
system calls, of all types, encountered on the co-processor per second.
.TP
\f4\-b\f1
Report buffer activity:
.br
bread/s, bwrit/s \- transfers per second of data between system buffers
and disk or other block devices;
.br
lread/s, lwrit/s \- accesses of system buffers;
.br
%rcache, %wcache \- cache hit ratios, i. e., (1\-bread/lread) as a percentage;
.br
pread/s, pwrit/s \- transfers via raw (physical) device mechanism.
When used with \f4\-D\f1, buffer caching is reported for
locally-mounted remote resources.
.TP
\f4\-d\f1
Report activity for each block device, e. g., disk or tape drive, with
the exception of XDC disks and tape drives.
When data is displayed, the device specification
.I dsk-
is generally used to represent a disk drive.
The device specification used to represent a tape drive is machine
dependent.
The activity data reported is:
.br
%busy, avque \- portion of time device was busy servicing a transfer request,
average number of requests outstanding during that time;
.br
r+w/s, blks/s \- number of data transfers from or to device,
number of bytes transferred in 512-byte units;
.br
.ne.5i
avwait, avserv \- average time in ms. 
that transfer requests wait idly on queue,
and average time to be serviced 
(which for disks includes 
seek, rotational latency and data transfer times).
.TP
\f4\-y\f1
Report TTY device activity:
.br
rawch/s, canch/s, outch/s \- input character rate,
input character rate processed by canon,
output character rate;
.br
rcvin/s, xmtin/s, mdmin/s \- receive, transmit and modem interrupt rates.
.TP
\f4\-c\f1
Report system calls:
.br
scall/s \- system calls of all types;
.br
sread/s, swrit/s, fork/s, exec/s \- specific system calls;
.br
rchar/s, wchar/s \- characters transferred by read and write
system calls.  When used with \f4\-D\f1, the system calls are split
into incoming, outgoing, and strictly local calls.  No incoming or outgoing
fork and exec calls are reported.
.TP
\f4\-w\f1
Report system swapping and switching activity:
.br
swpin/s, swpot/s, bswin/s, bswot/s \- number of transfers
and number of 512-byte units transferred for swapins
and swapouts
(including initial loading of some programs);
.br
pswch/s \- process switches.
.TP
\f4\-a\f1
Report use of file access system routines:
.br
iget/s, namei/s, dirblk/s.
.TP
\f4\-q\f1
Report average queue length while occupied, and % of time occupied:
.br
runq-sz, %runocc \- run queue of processes in memory and runnable;
.br
swpq-sz, %swpocc \- these are no longer reported by sar.
.TP
\f4\-v\f1
Report status of process, i-node, file tables:
.br
proc-sz, inod-sz, file-sz, lock-sz \- entries/size
for each table, evaluated once at sampling point;
.br
ov \- overflows that occur between sampling points for each table.
.TP
\f4\-m\f1
Report message and semaphore activities:
.br
msg/s, sema/s \- primitives per second.
.TP
\f4\-p\f1
Report paging activities:
.br
atch/s \- page faults per second that are satisfied
by reclaiming a page currently in memory (attaches per
second);
.br
pgin/s \- page-in requests per second;
.br
ppgin/s \- pages paged-in per second;
.br
pflt/s \- page faults from protection errors per second
(illegal access to page) or
"copy-on-writes";
.br
vflt/s \- address translation page faults per second (valid page not in
memory);
.br
slock/s \- faults per second caused by software lock 
requests requiring physical I/O.
.TP
\f4\-g\f1
Report paging activities:
.br
pgout/s \- page-out requests per second;
.br
ppgout/s \- pages paged-out per second;
.br
pgfree/s \- pages per second placed on the free list by
the page stealing daemon;
.br
pgscan/s \- pages per second scanned by the page stealing
daemon.
.br
%s5ipf \- the percentage of S5 inodes taken off the freelist by iget which
had reusable pages associated with it.  These pages are flushed and cannot
be reclaimed by processes.  Thus this is the percentage of igets with page
flushes.
.TP
\f4\-r\f1
Report unused memory pages and disk blocks:
.br
freemem \- average pages available to user processes;
.br
freeswap \- disk blocks available for page swapping.
.TP
\f4\-k\f1
Report kernel memory allocation (KMA) activities:
.br
sml_mem, alloc, fail \-
information about the memory 
pool reserving and allocating space for small requests:
the amount of memory in bytes KMA has for the
small pool, the number of bytes allocated
to satisfy requests for small amounts of memory, and
the number of requests for small amounts of memory
that were not satisfied (failed);
.br
lg_mem, alloc, fail \-
information for the large 
memory pool (analogous to the information for the small
memory pool);
.br
ovsz_alloc, fail \-
the amount of memory allocated
for oversize requests and the number of 
oversize requests which could not be satisfied
(because oversized memory is allocated dynamically, there
is not a pool).
.TP
\f4\-x\f1
Report remote file sharing (RFS) operations:
.br
open/s, create/s, lookup/s, readdir/s, getpage/s, putpage/s, other/s \-
The number of open, create, lookup, readdir, getpage, putpage, and other
operations made per second by clients (incoming) and by the server
(outgoing).
.TP
\f4\-D\f1
Report Remote File Sharing activity:
.br
When used in combination with \f4\-u\f1, \f4\-b\f1 or \f4\-c\f1, it
causes \f4sar\f1 to produce the remote file sharing version
of the corresponding report.  \f4\-Du\f1 is assumed when only \f4\-D\f1
is specified.
.TP
\f4\-S\f1
Report server and request queue status:
.br
serv/lo-hi \- average number of Remote File Sharing servers on the system
(lo and hi are the minimum and maximum number of servers respectively.)
.br
request %busy \- % of time receive descriptors are on the request queue 
.br
request avg lgth \- average number of receive descriptors waiting for service
when queue is occupied 
.br
server %avail \- % of time there are idle servers 
.br
server avg avail \- average number of idle servers when idle ones exist
.TP
\f4\-A\f1
Report all data.  Equivalent to
\f4\-udqbwcayvmpgrkxSDC\f1.
.TP
\f4\-C\f1
Report Remote File Sharing data caching overhead:
.br
snd-inv/s \- number of invalidation messages per second sent by your machine as
a server.
.br
snd-msg/s \- total outgoing RFS messages sent per second.
.br
rcv-inv/s \- number of invalidation messages received from the remote server.
.br
rcv-msg/s \- total number of incoming RFS messages received per second.
.br
dis-bread/s \- number of read messages that
would be eligible for caching if caching had not been turned off
because of an invalidation message.
(Indicates the penalty incurred because of the invalidation message.)
.br
blk-inv/s \- number of pages removed from the client cache in response to
cache invalidation messages.
.LE
.SH EXAMPLES
To see today's
.SM CPU
activity so far:
.PP
.RS
\f4sar\f1
.RE
.PP
To watch
.SM CPU
activity evolve for 10 minutes and save data:
.PP
.RS
\f4sar \|\-o temp 60 10\f1
.RE
.PP
To later review disk and tape activity from that period:
.PP
.RS
\f4sar \|\-d \|\-f temp\f1
.RE
.SH FILES
.TP 20
\f4/var/adm/sa/sa\fP\f2dd\f1
daily data file, where
.I dd\^
are digits representing the day of the month.
.SH SEE ALSO
\f4sag\fP(1G), \f4sar\fP(1M).
.\"	@(#)sar.1	6.3 of 1/4/84
.Ee

