2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH SAR 1 "Jul 24, 2004"
9 sar \- system activity reporter
13 \fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-o\fR \fIfilename\fR] \fIt\fR [\fIn\fR]
18 \fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-e\fR \fItime\fR] [\fB-f\fR \fIfilename\fR] [\fB-i\fR \fIsec\fR]
25 In the first instance, the \fBsar\fR utility samples cumulative activity
26 counters in the operating system at \fIn\fR intervals of \fIt\fR seconds, where
27 \fIt\fR should be \fB5\fR or greater. If \fIt\fR is specified with more than
28 one option, all headers are printed together and the output can be difficult to
29 read. (If the sampling interval is less than \fB5\fR, the activity of \fBsar\fR
30 itself can affect the sample.) If the \fB-o\fR option is specified, it saves
31 the samples in \fIfilename\fR in binary format. The default value of \fIn\fR is
35 In the second instance, no sampling interval is specified. \fBsar\fR extracts
36 data from a previously recorded \fIfilename\fR, either the one specified by the
37 \fB-f\fR option or, by default, the standard system activity daily data file
38 \fB/var/adm/sa/sa\fIdd\fR\fR for the current day \fIdd\fR. The starting and
39 ending times of the report can be bounded using the \fB-e\fR and \fB-s\fR
40 arguments with \fItime\fR specified in the form \fIhh\fR[:\fImm\fR[:\fIss\fR]].
41 The \fB-i\fR option selects records at \fIsec\fR second intervals. Otherwise,
42 all intervals found in the data file are reported.
46 The following options modify the subsets of information reported by \fBsar\fR.
53 Reports use of file access system routines: iget/s, namei/s, dirblk/s
62 Reports all data. Equivalent to \fB-abcdgkmpqruvwy\fR.
71 Reports buffer activity:
75 \fBbread/s, bwrit/s\fR
78 transfers per second of data between system buffers and disk or other block
85 \fBlread/s, lwrit/s\fR
88 accesses of system buffers.
94 \fB%rcache, %wcache\fR
97 cache hit ratios, that is, (1\(mibread/lread) as a percentage.
103 \fBpread/s, pwrit/s\fR
106 transfers using raw (physical) device mechanism.
109 If run in a non-global zone and the pools facility is active, these values
110 reflect activity on the processors of the processor set of the pool to which
120 Reports system calls:
128 system calls of all types.
134 \fBsread/s, swrit/s, fork/s, exec/s\fR
138 specific system calls.
144 \fBrchar/s, wchar/s\fR
148 characters transferred by read and write system calls. No incoming or outgoing
149 \fBexec\fR(2) and \fBfork\fR(2) calls are reported.
152 If run in a non-global zone and the pools facility is active, these values
153 reflect activity on the processors of the processor set of the pool to which
163 Reports activity for each block device (for example, disk or tape drive) with
164 the exception of \fBXDC\fR disks and tape drives. When data is displayed, the
165 device specification \fIdsk-\fR is generally used to represent a disk drive.
166 The device specification used to represent a tape drive is machine dependent.
167 The activity data reported is:
174 portion of time device was busy servicing a transfer request, average number of
175 requests outstanding during that time.
181 \fBread/s, write/s, blks/s\fR
184 number of read/write transfers from or to device, number of bytes transferred
194 average wait time in milliseconds.
203 average service time in milliseconds.
206 For more general system statistics, use \fBiostat\fR(1M), \fBsar\fR(1M), or
209 See \fISystem Administration Guide: Advanced Administration\fR for naming
210 conventions for disks.
216 \fB\fB-e\fR \fItime\fR\fR
219 Selects data up to \fBtime\fR. Default is \fB18:00\fR.
225 \fB\fB-f\fR \fIfilename\fR\fR
228 Uses \fIfilename\fR as the data source for \fBsar\fR. Default is the current
229 daily data file \fB/var/adm/sa/sa\fR\fIdd.\fR
238 Reports paging activities:
245 page-out requests per second.
254 pages paged-out per second.
263 pages per second placed on the free list by the page stealing daemon.
272 pages per second scanned by the page stealing daemon.
281 the percentage of \fBUFS\fR inodes taken off the freelist by iget which had
282 reusable pages associated with them. These pages are flushed and cannot be
283 reclaimed by processes. Thus, this is the percentage of igets with page
287 If run in a non-global zone and the pools facility is active, these values
288 reflect activity on the processors of the processor set of the pool to which
295 \fB\fB-i\fR \fIsec\fR\fR
298 Selects data at intervals as close as possible to \fIsec\fR seconds.
307 Reports kernel memory allocation (KMA) activities:
311 \fBsml_mem, alloc, fail\fR
314 information about the memory pool reserving and allocating space for small
315 requests: the amount of memory in bytes \fBKMA\fR has for the small pool, the
316 number of bytes allocated to satisfy requests for small amounts of memory, and
317 the number of requests for small amounts of memory that were not satisfied
324 \fBlg_mem, alloc, fail\fR
327 information for the large memory pool (analogous to the information for the
334 \fBovsz_alloc, fail\fR
337 the amount of memory allocated for oversize requests and the number of oversize
338 requests which could not be satisfied (because oversized memory is allocated
339 dynamically, there is not a pool).
350 Reports message and semaphore activities:
357 primitives per second.
360 If run in a non-global zone and the pools facility is active, these values
361 reflect activity on the processors of the processor set of the pool to which
368 \fB\fB-o\fR \fIfilename\fR\fR
371 Saves samples in file, \fIfilename\fR, in binary format.
380 Reports paging activities:
387 page faults per second that are satisfied by reclaiming a page currently in
388 memory (attaches per second).
397 page-in requests per second.
406 pages paged-in per second.
415 page faults from protection errors per second (illegal access to page) or
425 address translation page faults per second (valid page not in memory).
434 faults per second caused by software lock requests requiring physical
438 If run in a non-global zone and the pools facility is active, these values
439 reflect activity on the processors of the processor set of the pool to which
449 Reports average queue length while occupied, and percent of time occupied:
453 \fBrunq-sz, %runocc\fR
456 Run queue of kernel threads in memory and runnable
462 \fBswpq-sz, %swpocc\fR
465 Swap queue of processes
476 Reports unused memory pages and disk blocks:
483 average pages available to user processes.
492 disk blocks available for page swapping.
500 \fB\fB-s\fR \fItime\fR\fR
503 Selects data later than \fBtime\fR in the form \fIhh\fR[:\fImm\fR]. Default is
513 Reports \fBCPU\fR utilization (the default):
517 \fB%usr, %sys, %wio, %idle\fR
520 portion of time running in user mode, running in system mode, idle with some
521 process waiting for block \fBI/O\fR, and otherwise idle.
524 If run in a non-global zone and the pools facility is active, these values
525 reflect activity on the processors of the processor set of the pool to which
535 Reports status of process, i-node, file tables:
539 \fBproc-sz, inod-sz, file-sz, lock-sz\fR
543 entries/size for each table, evaluated once at sampling point.
553 overflows that occur between sampling points for each table.
564 Reports system swapping and switching activity:
568 \fBswpin/s, swpot/s, bswin/s, bswot/s\fR
572 number of transfers and number of 512-byte units transferred for swapins and
573 swapouts (including initial loading of some programs).
586 If run in a non-global zone and the pools facility is active, these values
587 reflect activity on the processors of the processor set of the pool to which
597 Reports TTY device activity:
601 \fBrawch/s, canch/s, outch/s\fR
604 input character rate, input character rate processed by canon, output character
611 \fBrcvin/s, xmtin/s, mdmin/s\fR
614 receive, transmit and modem interrupt rates.
617 If run in a non-global zone and the pools facility is active, these values
618 reflect activity on the processors of the processor set of the pool to which
624 \fBExample 1 \fRViewing System Activity
627 The following example displays today's \fBCPU\fR activity so far:
638 \fBExample 2 \fRWatching System Activity Evolve
641 To watch \fBCPU\fR activity evolve for 10 minutes and save data:
646 example% sar -o temp 60 10
652 \fBExample 3 \fRReviewing Disk and Tape Activity
655 To later review disk and tape activity from that period:
660 example% sar -d -f temp
669 \fB\fB/var/adm/sa/sa\fIdd\fR\fR\fR
672 daily data file, where \fIdd\fR are digits representing the day of the month
678 \fBsag\fR(1), \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M), \fBexec\fR(2),
679 \fBfork\fR(2), \fBattributes\fR(5)
682 \fISystem Administration Guide: Advanced Administration\fR
686 The sum of CPU utilization might vary slightly from 100 because of rounding
687 errors in the production of a percentage figure.