Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S

sar(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

sar — system activity reporter

SYNOPSIS

sar [-aAbcdHLmMqPRStuvwy] [-p psetid] [-o file] t [n]

sar [-aAbcdHLmMqPRStuvwy] [-p psetid] [-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, 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

Subsets of data to be printed are specified by options:

-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.

-A

Report all data. Equivalent to -abcdHLmqtuvwy.

-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, for example, 1 - bread/lread.

%wcache

Buffer cache hit ratio for write requests, for example, 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() (raw I/O) mechanism.

-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.

-d

Report activity for each block device, for example, 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.

r+w/s

Number of data transfers per second (read and writes) from and to the device.

r/s

Number of reads per second from the device. This information is available only when used with the -R option.

w/s

Number of writes per second to the device. This information is available only when used with the -R option.

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.

-f

Uses file as the data source for sar. Default is the current daily data file /var/adm/sa/sadd.

-H

Report activity for each HBA device. One line is printed for each HBA device that had activity during the last interval. If no devices were active, a blank line is printed. Each line contains the following data:

ctlr

Logical name of the HBA device and its corresponding instance.

%util

Portion of time device was busy servicing a request.

t-put

Number of bytes transferred (in MBs) from and to the device.

IO/s

Number of data transfers per second (read and writes) from and to the device.

r/s

Number of reads per second from the device.

w/s

Number of writes per second to the device.

read

Number of bytes read (in MBs) from the device.

write

Number of bytes written (in MBs) to the device.

avque

Average number of requests outstanding for 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 for the device.

-L

Report activity for each active lunpath. One line is printed for each lunpath that had activity during the last interval. If no lunpath were active, a blank line is printed. The lunpaths are not displayed in any specific order and it is not guaranteed that the current order will be maintained in future releases. Each line contains the following data:

lunpath

symbolic name of the lunpath of the form: diskm_lunpathn, where m and n are the instance numbers of LUN and lunpath respectively. These instance numbers are displayed by ioscan using option -N, for the LUN and lunpath entries. For more information on LUN and lunpath hardware path, refer to intro(7).

%busy

Portion of time lunpath was busy servicing a request.

avque

Average number of requests outstanding for the lunpath.

r/s

Number of reads per second from the lunpath.

w/s

Number of writes per second to the lunpath.

blks/s

Number of bytes transferred (in 512-byte units) from and to the LUN using this lunpath.

avwait

Average time (in milliseconds) that transfer requests waited idly on queue for this lunpath.

avserv

Average time (in milliseconds) to service each transfer request (includes seek, rotational latency, and data transfer times) for this lunpath.

-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.

-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.

-o

Saves the samples in binary format.

-p

Report the specified ProcessorSet (pset) information. This option should be used with the -u or -q option.

-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.

-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).

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.

-R

This option is used with the -d option to report the number of reads and writes per second to the device. Refer to the description of the -d option for details.

-S

Report the number of System V select() calls per second. This option is valid only if the -m option is specified.

-t

Report activity for each tape device. One line is printed for each tape 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 tape device and its corresponding instance.

%busy

Portion of time the device was busy servicing a request.

r/s

Number of reads per second from the device.

w/s

Number of writes per second to the device.

read

Number of bytes read (in MBs) from the device.

write

Number of bytes written (in MBs) to the device.

avserv

Average time (in milliseconds) to service each transfer request (includes seek, rotational latency, and data transfer times) for the device.

-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 multi-processor 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).

%idle

otherwise idle.

-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.

-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.

-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).

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

Watch lunpath activity evolve for 5 seconds:

sar -L 1 5

Watch tape activity evolve for 5 seconds:

sar -t 1 5

Watch HBAs activity evolve for 5 seconds:

sar -H 1 5

Watch disk reads and writes per second for 5 seconds:

sar -R -d 1 5

WARNINGS

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

/var/adm/sa/sadd

daily data file, where dd is two digits representing the day of the month.

STANDARDS CONFORMANCE

sar: SVID2, SVID3

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.