'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 1989 AT&T .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH SAR 1 "Jul 24, 2004" .SH NAME sar \- system activity reporter .SH SYNOPSIS .LP .nf \fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-o\fR \fIfilename\fR] \fIt\fR [\fIn\fR] .fi .LP .nf \fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-e\fR \fItime\fR] [\fB-f\fR \fIfilename\fR] [\fB-i\fR \fIsec\fR] [\fB-s\fR \fItime\fR] .fi .SH DESCRIPTION .sp .LP In the first instance, the \fBsar\fR utility samples cumulative activity counters in the operating system at \fIn\fR intervals of \fIt\fR seconds, where \fIt\fR should be \fB5\fR or greater. If \fIt\fR is specified with more than one option, all headers are printed together and the output can be difficult to read. (If the sampling interval is less than \fB5\fR, the activity of \fBsar\fR itself can affect the sample.) If the \fB-o\fR option is specified, it saves the samples in \fIfilename\fR in binary format. The default value of \fIn\fR is \fB1\fR. .sp .LP In the second instance, no sampling interval is specified. \fBsar\fR extracts data from a previously recorded \fIfilename\fR, either the one specified by the \fB-f\fR option or, by default, the standard system activity daily data file \fB/var/adm/sa/sa\fIdd\fR\fR for the current day \fIdd\fR. The starting and ending times of the report can be bounded using the \fB-e\fR and \fB-s\fR arguments with \fItime\fR specified in the form \fIhh\fR[:\fImm\fR[:\fIss\fR]]. The \fB-i\fR option selects records at \fIsec\fR second intervals. Otherwise, all intervals found in the data file are reported. .SH OPTIONS .sp .LP The following options modify the subsets of information reported by \fBsar\fR. .sp .ne 2 .na \fB\fB-a\fR\fR .ad .RS 15n Reports use of file access system routines: iget/s, namei/s, dirblk/s .RE .sp .ne 2 .na \fB\fB-A\fR\fR .ad .RS 15n Reports all data. Equivalent to \fB-abcdgkmpqruvwy\fR. .RE .sp .ne 2 .na \fB\fB-b\fR\fR .ad .RS 15n Reports buffer activity: .sp .ne 2 .na \fBbread/s, bwrit/s\fR .ad .RS 20n transfers per second of data between system buffers and disk or other block devices. .RE .sp .ne 2 .na \fBlread/s, lwrit/s\fR .ad .RS 20n accesses of system buffers. .RE .sp .ne 2 .na \fB%rcache, %wcache\fR .ad .RS 20n cache hit ratios, that is, (1\(mibread/lread) as a percentage. .RE .sp .ne 2 .na \fBpread/s, pwrit/s\fR .ad .RS 20n transfers using raw (physical) device mechanism. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-c\fR\fR .ad .RS 15n Reports system calls: .sp .ne 2 .na \fBscall/s\fR .ad .sp .6 .RS 4n system calls of all types. .RE .sp .ne 2 .na \fBsread/s, swrit/s, fork/s, exec/s\fR .ad .sp .6 .RS 4n specific system calls. .RE .sp .ne 2 .na \fBrchar/s, wchar/s\fR .ad .sp .6 .RS 4n characters transferred by read and write system calls. No incoming or outgoing \fBexec\fR(2) and \fBfork\fR(2) calls are reported. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-d\fR\fR .ad .RS 15n Reports activity for each block device (for example, disk or tape drive) with the exception of \fBXDC\fR disks and tape drives. When data is displayed, the device specification \fIdsk-\fR 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: .sp .ne 2 .na \fB%busy, avque\fR .ad .RS 27n portion of time device was busy servicing a transfer request, average number of requests outstanding during that time. .RE .sp .ne 2 .na \fBread/s, write/s, blks/s\fR .ad .RS 27n number of read/write transfers from or to device, number of bytes transferred in 512-byte units. .RE .sp .ne 2 .na \fBavwait\fR .ad .RS 27n average wait time in milliseconds. .RE .sp .ne 2 .na \fBavserv\fR .ad .RS 27n average service time in milliseconds. .RE For more general system statistics, use \fBiostat\fR(1M), \fBsar\fR(1M), or \fBvmstat\fR(1M). .sp See \fISystem Administration Guide: Advanced Administration\fR for naming conventions for disks. .RE .sp .ne 2 .na \fB\fB-e\fR \fItime\fR\fR .ad .RS 15n Selects data up to \fBtime\fR. Default is \fB18:00\fR. .RE .sp .ne 2 .na \fB\fB-f\fR \fIfilename\fR\fR .ad .RS 15n Uses \fIfilename\fR as the data source for \fBsar\fR. Default is the current daily data file \fB/var/adm/sa/sa\fR\fIdd.\fR .RE .sp .ne 2 .na \fB\fB-g\fR\fR .ad .RS 15n Reports paging activities: .sp .ne 2 .na \fBpgout/s\fR .ad .RS 12n page-out requests per second. .RE .sp .ne 2 .na \fBppgout/s\fR .ad .RS 12n pages paged-out per second. .RE .sp .ne 2 .na \fBpgfree/s\fR .ad .RS 12n pages per second placed on the free list by the page stealing daemon. .RE .sp .ne 2 .na \fBpgscan/s\fR .ad .RS 12n pages per second scanned by the page stealing daemon. .RE .sp .ne 2 .na \fB%ufs_ipf\fR .ad .RS 12n the percentage of \fBUFS\fR inodes taken off the freelist by iget which had reusable pages associated with them. These pages are flushed and cannot be reclaimed by processes. Thus, this is the percentage of igets with page flushes. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-i\fR \fIsec\fR\fR .ad .RS 15n Selects data at intervals as close as possible to \fIsec\fR seconds. .RE .sp .ne 2 .na \fB\fB-k\fR\fR .ad .RS 15n Reports kernel memory allocation (KMA) activities: .sp .ne 2 .na \fBsml_mem, alloc, fail\fR .ad .RS 24n information about the memory pool reserving and allocating space for small requests: the amount of memory in bytes \fBKMA\fR has for the small pool, the number of bytes allocated to satisfy requests for small amounts of memory, and the number of requests for small amounts of memory that were not satisfied (failed). .RE .sp .ne 2 .na \fBlg_mem, alloc, fail\fR .ad .RS 24n information for the large memory pool (analogous to the information for the small memory pool). .RE .sp .ne 2 .na \fBovsz_alloc, fail\fR .ad .RS 24n the amount of memory allocated for oversize requests and the number of oversize requests which could not be satisfied (because oversized memory is allocated dynamically, there is not a pool). .RE .RE .sp .ne 2 .na \fB\fB-m\fR\fR .ad .RS 15n Reports message and semaphore activities: .sp .ne 2 .na \fBmsg/s, sema/s\fR .ad .RS 17n primitives per second. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-o\fR \fIfilename\fR\fR .ad .RS 15n Saves samples in file, \fIfilename\fR, in binary format. .RE .sp .ne 2 .na \fB\fB-p\fR\fR .ad .RS 15n Reports paging activities: .sp .ne 2 .na \fBatch/s\fR .ad .RS 11n page faults per second that are satisfied by reclaiming a page currently in memory (attaches per second). .RE .sp .ne 2 .na \fBpgin/s\fR .ad .RS 11n page-in requests per second. .RE .sp .ne 2 .na \fBppgin/s\fR .ad .RS 11n pages paged-in per second. .RE .sp .ne 2 .na \fBpflt/s\fR .ad .RS 11n page faults from protection errors per second (illegal access to page) or "copy-on-writes". .RE .sp .ne 2 .na \fBvflt/s\fR .ad .RS 11n address translation page faults per second (valid page not in memory). .RE .sp .ne 2 .na \fBslock/s\fR .ad .RS 11n faults per second caused by software lock requests requiring physical \fBI/O\fR. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-q\fR\fR .ad .RS 15n Reports average queue length while occupied, and percent of time occupied: .sp .ne 2 .na \fBrunq-sz, %runocc\fR .ad .RS 20n Run queue of kernel threads in memory and runnable .RE .sp .ne 2 .na \fBswpq-sz, %swpocc\fR .ad .RS 20n Swap queue of processes .RE .RE .sp .ne 2 .na \fB\fB-r\fR\fR .ad .RS 15n Reports unused memory pages and disk blocks: .sp .ne 2 .na \fBfreemem\fR .ad .RS 12n average pages available to user processes. .RE .sp .ne 2 .na \fBfreeswap\fR .ad .RS 12n disk blocks available for page swapping. .RE .RE .sp .ne 2 .na \fB\fB-s\fR \fItime\fR\fR .ad .RS 15n Selects data later than \fBtime\fR in the form \fIhh\fR[:\fImm\fR]. Default is \fB08:00\fR. .RE .sp .ne 2 .na \fB\fB-u\fR\fR .ad .RS 15n Reports \fBCPU\fR utilization (the default): .sp .ne 2 .na \fB%usr, %sys, %wio, %idle\fR .ad .RS 27n portion of time running in user mode, running in system mode, idle with some process waiting for block \fBI/O\fR, and otherwise idle. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-v\fR\fR .ad .RS 15n Reports status of process, i-node, file tables: .sp .ne 2 .na \fBproc-sz, inod-sz, file-sz, lock-sz\fR .ad .sp .6 .RS 4n entries/size for each table, evaluated once at sampling point. .RE .sp .ne 2 .na \fBov\fR .ad .sp .6 .RS 4n overflows that occur between sampling points for each table. .RE .RE .sp .ne 2 .na \fB\fB-w\fR\fR .ad .RS 15n Reports system swapping and switching activity: .sp .ne 2 .na \fBswpin/s, swpot/s, bswin/s, bswot/s\fR .ad .sp .6 .RS 4n number of transfers and number of 512-byte units transferred for swapins and swapouts (including initial loading of some programs). .RE .sp .ne 2 .na \fBpswch/s\fR .ad .sp .6 .RS 4n process switches. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .sp .ne 2 .na \fB\fB-y\fR\fR .ad .RS 15n Reports TTY device activity: .sp .ne 2 .na \fBrawch/s, canch/s, outch/s\fR .ad .RS 29n input character rate, input character rate processed by canon, output character rate. .RE .sp .ne 2 .na \fBrcvin/s, xmtin/s, mdmin/s\fR .ad .RS 29n receive, transmit and modem interrupt rates. .RE If run in a non-global zone and the pools facility is active, these values reflect activity on the processors of the processor set of the pool to which the zone is bound. .RE .SH EXAMPLES .LP \fBExample 1 \fRViewing System Activity .sp .LP The following example displays today's \fBCPU\fR activity so far: .sp .in +2 .nf example% sar .fi .in -2 .sp .LP \fBExample 2 \fRWatching System Activity Evolve .sp .LP To watch \fBCPU\fR activity evolve for 10 minutes and save data: .sp .in +2 .nf example% sar -o temp 60 10 .fi .in -2 .sp .LP \fBExample 3 \fRReviewing Disk and Tape Activity .sp .LP To later review disk and tape activity from that period: .sp .in +2 .nf example% sar -d -f temp .fi .in -2 .sp .SH FILES .sp .ne 2 .na \fB\fB/var/adm/sa/sa\fIdd\fR\fR\fR .ad .RS 20n daily data file, where \fIdd\fR are digits representing the day of the month .RE .SH SEE ALSO .sp .LP \fBsag\fR(1), \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M), \fBexec\fR(2), \fBfork\fR(2), \fBattributes\fR(5) .sp .LP \fISystem Administration Guide: Advanced Administration\fR .SH NOTES .sp .LP The sum of CPU utilization might vary slightly from 100 because of rounding errors in the production of a percentage figure.