Linux and Unix sar command
Quick links
About sar
Syntax
Examples
Related commands
Linux and Unix main page
Displays the activity for the CPU.
sar [-a] [-A] [-b] [-c] [-d] [-g] [-k] [-m] [-p] [-q] [-r] [-u] [-v] [-w] [-y ] [ -o filename ] t [ n ]
sar [-a] [-A] [-b] [-c] [-d] [-g] [-k] [-m] [-p] [-q] [-r] [-u] [-v] [-w] [-y ] [ -e time ] [ -f filename ] [-i sec ] [ -s time ]
| -a | Report use of file access system routines: iget/s, namei/s, dirblk/s |
| -A | Report all data. Equivalent to -abcdgkmpqruvwy. |
| -b | Report buffer activity:
bread/s, bwrit/s lread/s, lwrit/s %rcache, %wcache pread/s, pwrit/s |
| -c | Report system calls:
scall/s system calls of all types. sread/s, swrit/s, fork/s, exec/s rchar/s, wchar/s |
| -d | Report activity for each block device (for example, disk or tape drive) with the exception of XDC disks and tape drives. When data is displayed,
the device specification dsk- is generally used to represent a disk drive. The device specification used to represent a tape drive is machine
dependent. The activity data reported is:
%busy, avque read/s, write/s, blks/s avwait average wait time in milliseconds. avserv average service time in milliseconds. |
| -g | Report paging activities:
pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf |
| -k | Report kernel memory allocation (KMA) activities:
sml_mem, alloc, fail lg_mem, alloc, fail ovsz_alloc, fail |
| -m | Report message and semaphore activities:
msg/s, sema/s |
| -p | Report paging activities:
atch/s pgin/s ppgin/s pflt/s vflt/s slock/s |
| -q | Report average queue length while occupied, and percent of time occupied:
runq-sz, %runocc swpq-sz, %swpocc |
| -r | Report unused memory pages and disk blocks:
freemem average pages available to user processes. freeswap disk blocks available for page swapping. |
| -u | Report CPU utilization (the default):
%usr, %sys, %wio, %idle |
| -v | Report status of process, i-node, file tables: proc-sz, inod-sz, file-sz, lock-sz entries/size for each table, evaluated ov |
| -w | Report system swapping and switching activity:
swpin/s, swpot/s, bswin/s, bswot/s pswch/s |
| -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 |
| -o filename | Save samples in file, filename, in binary format. |
| -e time | Select data up to time . Default is 18:00. |
| -f filename | Use filename as the data source for sar . Default is the current daily data file /var/adm/sa/sadd. |
| -i sec | Select data at intervals as close as possible to sec seconds. |
sar
Display today's CPU activity so far. You must have permission and the information must be present on the computer.
