sar(1M) sar(1M)
NAME [Toc] [Back]
sar - system activity reporter
SYNOPSIS [Toc] [Back]
sar [-ubdycwaqvmAMPS] [-p psetid] [-o file] t [n]
sar [-ubdycwaqvmAMPS] [-p psetid] [-s time] [-e time] [-i sec]
[-f file]
DESCRIPTION [Toc] [Back]
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, sar extracts data from a previously recorded file, either
the one specified by -f option or, by default, the standard system
activity daily data file /var/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.
Options [Toc] [Back]
Subsets of data to be printed are specified by options:
-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 active processors are reported. If
the -M option is not used, only the average CPU utilization
of all the active processors is reported. On a multiprocessor
ProcessorSet (pset) configured system, if the -P
option is used together with the -M and -u options, the
column for pset mapping to processor will be displayed
before the cpu column.
pset pset id (only on a multi-processor pset
configured system with the -P , -M and
-u option);
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);
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
sar(1M) sar(1M)
%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. One line is printed for each device that had
activity during the last interval. If no devices were
active, a blank line is printed. Each line contains the
following data:
device Logical name of the device and its
corresponding instance. Devices are
categorized into the following device
types:
disk3 - SCSI and NIO FL disks
sdisk - SCSI disks;
%busy Portion of time device was busy
servicing a request;
avque Average number of requests outstanding
for the device;
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
sar(1M) sar(1M)
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;
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
sar(1M) sar(1M)
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 active
processors are reported. If the -M option is not used,
only the average run queue information of all the active
processors is reported. In a multi-processor pset
configured system if the -M option is used with the option
-P then pset column will will be displayed before cpu
column:
pset pset id (only on a multi-processor and
pset configured system, used with -P ,
-M and -q option)
cpu cpu number (only on a multi-processor
system and used with the -M option)
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
sar(1M) sar(1M)
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). This column will
not be displayed when -p option is used
to display a particular ProcessorSet
(pset) information in a pset configured
system.
%swpocc The percentage of time the swap queue of
runnable processes (processes swapped
out but ready to run) was occupied.
This column will not be displayed when
-p option is used to display a
particular ProcessorSet (pset)
information in a pset configured system.
-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
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003
sar(1M) sar(1M)
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;
select/s Number of System V select() calls per
second. This value will only be
reported if the -S option is also
explicitly specified.
-p Report the specified ProcessorSet (pset) information. This
option should be used with -u or -q option.
-S Report the number of System V select() calls per second.
This option is valid only if the -m option is specified.
-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 active processors.
-P Report ProcessorSet (pset) information, mapping to the
processor in the system or the specified pset. This option
can only be used with -M and -q, or -M and -u options. It
can also be combined with -p option to display information
for a particular pset. If system is not pset configured it
will display a warning message.
EXAMPLES [Toc] [Back]
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
Hewlett-Packard Company - 6 - HP-UX 11i Version 2: August 2003
sar(1M) sar(1M)
Review cpu utilization on a multi-processor system later:
sar -u -M -f temp
WARNINGS [Toc] [Back]
Users of sar must not rely on the exact field widths and spacing of
its output, as these will vary depending on the system, the release of
HP-UX, and the data to be displayed.
The output of sar is unpredictable if a corrupted or wrong data file
is given as argument with the -f option.
FILES [Toc] [Back]
/var/adm/sa/sadd daily data file, where dd is two digits
representing the day of the month.
SEE ALSO [Toc] [Back]
sa1(1M).
STANDARDS CONFORMANCE [Toc] [Back]
sar: SVID2, SVID3
Hewlett-Packard Company - 7 - HP-UX 11i Version 2: August 2003 [ Back ] |