sar(1) — Series 800 Only
NAME
sar − system activity reporter
SYNOPSIS
sar [-ubdycwaqvmAM] [-o file] t [n]
sar [-ubdycwaqvmAM] [-s time] [-e time] [-i sec] [-f file]
DESCRIPTION
In the first form above, 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 form, with no sampling interval specified, extracts data from a previously recorded file, either the one specified by -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 option:
-u Report CPU utilization (the default); portion of time running in one of several modes. On a multi-processor system, if the -M option is used together with the -u option, per- CPU utilization as well as the average CPU utilization of all the processors are reported. If the -M option is not used, only the average CPU utilization of all the processors is reported:
cpu cpu number (only on a multi-processor system with the -M option);
%usr user mode;
%sys system mode;
%wio idle with some process waiting for I/O (only block I/O, raw I/O, or VM pageins/swapins indicated);
%idle otherwise idle.
-b Report buffer activity:
bread/s Number of physical reads per second from the disk (or other block devices) to the buffer cache;
bwrit/s Number of physical writes per second from the buffer cache to the disk (or other block device);
lread/s Number of reads per second from buffer cache;
lwrit/s Number of writes per second to buffer cache;
%rcache Buffer cache hit ratio for read requests e.g., 1 − bread/lread;
%wcache Buffer cache hit ratio for write requests e.g., 1 − bwrit/lwrit;
pread/s Number of reads per second from character device using the physio() (raw I/O ) mechanism;
pwrit/s Number of writes per second to character device using the physio() (i.e., raw I/O ) mechanism; mechanism.
-d Report activity for each block device, e.g., disk or tape drive:
device Logical name of the device and its corresponding LU. Devices are categorized into the following three device types:
disk1 − HP-IB disks (CS/80)
disk2 − CIO HP-FL disks (CS/80)
disk3 − SCSI disks and NIO FL disks;
%busy Portion of time device was busy servicing a request;
avque Average number of requests outstanding for the device;
r+w/s Number of data transfers per second (read and writes) from and to the device;
blks/s Number of bytes transferred (in 512-byte units) from and to the device;
avwait Average time (in milliseconds) that transfer requests waited idly on queue for the device;
avserv Average time (in milliseconds) to service each transfer request (includes seek, rotational latency, and data transfer times) for the device.
-y Report tty device activity:
rawch/s Raw input characters per second;
canch/s Input characters per second processed by canon();
outch/s Output characters per second;
rcvin/s Receive incoming character interrupts per second;
xmtin/s Transmit outgoing character interrupts per second;
mdmin/s Modem interrupt rate (not supported; always 0).
-c Report system calls:
scall/s Number of system calls of all types per second;
sread/s Number of read() and/or readv() system calls per second;
swrit/s Number of write() and/or writev() system calls per second;
fork/s Number of fork() and/or vfork() system calls per second;
exec/s Number of exec() system calls per second;
rchar/s Number of characters transferred by read system calls block devices only) per second;
wchar/s Number of characters transferred by write system calls (block devices only) per second.
-w Report system swapping and switching activity:
swpin/s Number of process swapins per second;
swpot/s Number of process swapouts per second;
bswin/s Number of 512-byte units transferred for swapins per second;
bswot/s Number of 512-byte units transferred for swapouts per second;
pswch/s Number of process context switches per second.
-a Report use of file access system routines:
iget/s Number of file system iget() calls per second;
namei/s Number of file system lookuppn() (pathname translation) calls per second;
dirblk/s Number of file system blocks read per second doing directory lookup.
-q Report average queue length while occupied, and percent of time occupied. On a multi-processor machine, if the -M option is used together with the -q option, the per- CPU run queue as well as the average run queue of all the processors are reported. If the -M option is not used, only the average run queue information of all the processors is reported:
cpu cpu number (only on a multi-processor system and used with the -M option)
runq-sz Average length of the run queue(s) of processes (in memory and runnable);
%runocc The percentage of time the run queue(s) were occupied by processes (in memory and runnable);
swpq-sz Average length of the swap queue of runnable processes (processes swapped out but ready to run);
%swpocc The percentage of time the swap queue of runnable processes (processes swapped out but ready to run) was occupied.
-v Report status of text, process, inode and file tables:
text-sz (Not Applicable);
proc-sz The current-size and maximum-size of the process table;
inod-sz The current-size and maximum-size of the inode table (inode cache);
file-sz The current-size and maximum-size of the system file table;
text-ov (Not Applicable);
proc-ov The number of times the process table overflowed (number of times the kernel could not find any available process table entries) between sample points;
inod-ov The number of times the inode table (inode cache) overflowed (number of times the kernel could not find any available inode table entries) between sample points;
file-ov The number of times the system file table overflowed (number of times the kernel could not find any available file table entries) between sample points.
-m Report message and semaphore activities:
msg/s Number of System V msgrcv() calls per second;
sema/s Number of System V semop() calls per second.
-A Report all data. Equivalent to -udqbwcayvm.
-M Report the per-processor data on a multi-processor system when used with -q and/or -u options. If the -M option is not used on a multi-processor system, the output format of the -u and -q options is the same as the uni-processor output format and the data reported is the average value of all the processors.
EXAMPLES
Watch CPU activity evolve for 5 seconds:
sar 1 5
Watch CPU activity evolve for 10 minutes and save data:
sar -o temp 60 10
Review disk and tape activity from that period later:
sar -d -f temp
Review cpu utilization on a multi-processor system later:
sar -u -M -f temp
FILES
/usr/adm/sa/sadd daily data file, where dd is two digits representing the day of the month.
SEE ALSO
STANDARDS CONFORMANCE
sar: SVID2
Hewlett-Packard Company — HP-UX Release 9.0: August 1992