sar(1)
_________________________________________________________________
sar Command
system activity reporter
_________________________________________________________________
SYNTAX
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 the -o option
is specified, it saves the samples in file in binary format. The
default value of 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
these options:
-u Report CPU usage (the default):
%usr, %sys, %idle - portion of time running in user mode,
running in system mode, and otherwise idle.
-b Report buffer activity:
bread/s, bwrit/s - transfers per second of data between
system buffers and disk or other block devices;
lread/s, lwrit/s - accesses of system buffers;
%rcache, %wcache - cache hit ratios, e. g., 1 - bread/lread;
pread/s, pwrit/s - transfers via raw (physical) device
mechanism.
-d Report activity for each disk drive. When data is
displayed, the device specification cnndnn (e.g., c24d1)
represents a disk drive. The activity data reported is:
%busy, acque --portion of time device was busy servicing a
transfer request, average number of requests outstanding
during that time; blks/s--number of bytes transferred in
512-byte units; avserv--average time to be serviced (which
for disks includes seek rotational latency and data transfer
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
sar(1)
times).
-y Report TTY device activity:
rawch/s, canch/s, outch/s - input character rate, input
character rate processed by canon, output character rate;
rcvin/s, xmtin/s, mdmin/s - receive, transmit and modem
interrupt rates.
-c Report system calls:
scall/s - system calls of all types;
sread/s, swrit/s, fork/s, exec/s - specific system calls;
rchar/s, wchar/s - characters transferred by read and write
system calls.
-a Report use of file access system routines:
iget/s, namei/s, dirblk/s.
-q Report average queue length while occupied, and percentage
of time occupied:
runq-sz, %runocc - run queue of processes that are runnable;
swpq-sz, %swpocc - swap queue of processes swapped out and
not ready to run.
-v Report status of text, process, inode and file tables:
text-sz, proc-sz, inod-sz, file-sz - entries/size for each
table, evaluated once at sampling point;
text-ov, proc-ov, inod-ov, file-ov - overflows occurring
between sampling points.
-m Report message and semaphore activities:
msg/s, sema/s - primitives per second.
-p Report paging activities:
vflt/s - address translation page faults (valid page not in
memory);
ptlt/s - page faults from protection errors (illegal access
to page) or "copy-on-writes";
pgfil/s - vflt/s satisfied by page-in from file system;
rclm/s -valid pages reclaimed for free list.
-r Report unused memory pages and disk blocks:
freemem - average pages available to user processes;
freeswap - disk blocks available for process swapping.
-A Report all data. This supersedes all other options and is
equivalent to -ubdycwaqvmpr.
_________________________________________________________________
EXAMPLES
$ sar
dgux sdd08 4.00 4.00 MV4000 12/03/xx
00:00:05 %usr %sys idle
01:00:04 3 2 95
02:00:04 3 2 94
03:00:04 3 2 96
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)
sar(1)
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 this example, sar reports CPU usage from
the standard system activity daily file for the current day.
$ sar -c
dgux sdd08 4.00 4.00 MV4000 12/03/xx
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 sdd08 4.00 4.00 MV4000 12/03/xx
00:00:05 runq-sz %runocc swpq-sz %swpocc
01:00:04 1.0 5 0 0
02:00:04 1.2 5 1 5
03:00:04 1.0 4 0 0
04:00:04 1.0 4 0 0
05:00:03 1.0 4 0 0
06:00:04 1.0 4 0 0
07:00:04 1.0 4 1 5
Average 1.0 4 0.3 1.4
$
In this example, sar reports average queue length while occupied,
and percent of time occupied.
$ sar -v
DG/UX 4.00 Page 3
Licensed material--property of copyright holder(s)
sar(1)
dgux sdd08 4.00 4.00 MV4000 12/03/xx
00:00:05 text-sz proc-sz inod-sz file-sz text-ov proc-ov inod-ov file-ov
01:00:04 28/100 69/120 95/240 102/240 0 0 0 0
02:00:04 28/100 69/120 95/240 102/240 0 0 0 0
03:00:04 28/100 69/120 95/240 102/240 0 0 0 0
04:00:04 28/100 69/120 95/240 102/240 0 0 0 0
05:00:03 28/100 69/120 95/240 102/240 0 0 0 0
06:00:04 28/100 69/120 95/240 102/240 0 0 0 0
07:00:04 28/100 69/120 95/240 102/240 0 0 0 0
$
In this example, sar reports status of text, process, inode and
file tables: size of each table and overflows occuring between
sampling points.
_________________________________________________________________
EXAMPLES
To see today's CPU activity so far:
sar
To watch CPU activity evolve for 10 minutes and save data:
sar -o temp 60 10
To later review tape activity from that period:
sar -f temp
FILES
/usr/adm/sa/sadd daily data file, where dd are digits
representing the day of the month.
SEE ALSO
sar(1M) in the System Manager's Reference for the DG/UX System
DG/UX 4.00 Page 4
Licensed material--property of copyright holder(s)