sar
PURPOSE
Collects, reports, or saves system activity information.
SYNOPSIS
sar [-abckmquvwyA] [-o file] t [ n ]
sar [-abckmquvwyA] [-s time] [-e time] [-i sec] [-f file]
DESCRIPTION
The first format of the sar command writes to standard
output the contents of selected cumulative activity
counters in the operating system. It writes information
a total of number times spaced interval seconds apart.
The default value of number is 1. You can also save the
collected data in the file specified by -o file.
In the second format (with no sampling interval speci-
fied), sar extracts and writes to standard output records
previously saved in a file. This file can be either the
one specified by the -f flag or, by default, the standard
system activity daily data file, /usr/adm/sa/sadd, for
the current day, dd.
You can select information about specific system activ-
ities with flags. Not specifying any flags selects only
cpu activity. Specifying the -A flag selects all activ-
ities.
Note: This command only reports on local activities.
FLAGS
-a Reports use of file access system routines:
iget/s Calls per second to the
i-node look-up routine.
namei/s Calls per second to the
directory search
routine.
dirblk/s Directory blocks read
per second by namei().
-A Report all data.
-b Reports buffer activity for transfers,
accesses, and cache hit ratios:
lread/s, lwrit/s Number of logical
read/write requests per
interval.
bread/s, bwrit/s Number of block
read/write operations
per interval.
%rcache, %wcache Cache hit ratios (for
example, 1 -
bread/lread).
pread/s, pwrit/s Read/writes per interval
on seekable raw devices.
-c Reports system calls:
scall/s Total number of system
calls per second.
rchar/s, wchar/s Characters transferred
per interval by
read/write calls.
sread/s, swrit/s
fork/s, exec/s Specific system calls
per second.
-e hh[:mm[:ss]]
Sets the ending time of the report. The
default ending time is 18:00.
-f file Extracts records from file (created by -o
file). The default file is the current
daily data file, /usr/adm/sa/sadd.
-i seconds Selects data records at intervals as close
as possible to the specified number of
seconds. Otherwise, sar reports all inter-
vals found in the data file.
-k Reports kernel activity:
ksched/s Number of kernel proc-
esses assigned to tasks
per second.
kproc-ov/s Number of overflows
occurring between sam-
pling points.
kexit/s Number of kernel proc-
esses terminating per
second.
-m Reports message and semaphore activities:
msg/s IPC message primitives
per second.
sema/s IPC semaphore primitives
per second.
-o file Saves the readings in file in binary form.
Each reading is in a separate record and
each record contains a tag identifying the
time of the reading.
-q Reports average queue length while occupied,
and percentage of time occupied:
runq-sz, %runocc Runs queue of processes
in memory and runable.
-r Reports VRM paging statistics:
slots The number of free pages
on the paging minidisk.
cycle/s The number of page
replacement cycles per
second.
fault/s The number of page
faults per second.
odio/s The number of nonpaging
disk I/Os per second.
-s hh[:mm[:ss]]
Sets the starting time of the data. That
is, extract records time-tagged at or fol-
lowing the time specified. The default
starting time is 08:00.
-u Reports CPU activity (this flag is on by
default):
%usr Percentage of CPU time
devoted to the user.
%sys Percentage of CPU time
devoted to the kernel.
%wio Percentage of CPU time
waiting for block I/O to
complete.
%idle Percentage of CPU time
idle.
-v Reports status of text, process, i-node, and
file tables:
text-sz, proc-sz,
inod-sz, file-sz Entries in use at each
sample point for each
table.
text-ov, proc-ov,
inod-ov, file-ov Overflows occurring at
each sample point for
each table.
-w Reports system switching activity:
pswch/s Process switches per
second.
-y Reports TTY device activity:
rawch/s TTY raw input queue
characters per second.
canch/s TTY canonical input
queue characters per
second.
outch/s TTY output queue charac-
ters per second.
revin/s TTY receive interrupts
per second.
xmtin/s TTY transmit interrupts
per second.
mdmin/s TTY modem interrupts per
second.
FILES
/usr/adm/sa/sadd Daily data file, where dd are
numbers representing the day of the
month.
RELATED INFORMATION
The following command: "sag."
The discussion of monitoring system activity in Managing
the AIX Operating System.