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 "May 13, 2017"
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]
24 In the first instance, the \fBsar\fR utility samples cumulative activity
25 counters in the operating system at \fIn\fR intervals of \fIt\fR seconds, where
26 \fIt\fR should be \fB5\fR or greater. If \fIt\fR is specified with more than
27 one option, all headers are printed together and the output can be difficult to
28 read. (If the sampling interval is less than \fB5\fR, the activity of \fBsar\fR
29 itself can affect the sample.) If the \fB-o\fR option is specified, it saves
30 the samples in \fIfilename\fR in binary format. The default value of \fIn\fR is
34 In the second instance, no sampling interval is specified. \fBsar\fR extracts
35 data from a previously recorded \fIfilename\fR, either the one specified by the
36 \fB-f\fR option or, by default, the standard system activity daily data file
37 \fB/var/adm/sa/sa\fIdd\fR\fR for the current day \fIdd\fR. The starting and
38 ending times of the report can be bounded using the \fB-e\fR and \fB-s\fR
39 arguments with \fItime\fR specified in the form \fIhh\fR[:\fImm\fR[:\fIss\fR]].
40 The \fB-i\fR option selects records at \fIsec\fR second intervals. Otherwise,
41 all intervals found in the data file are reported.
44 The following options modify the subsets of information reported by \fBsar\fR.
51 Reports use of file access system routines: iget/s, namei/s, dirblk/s
60 Reports all data. Equivalent to \fB-abcdgkmpqruvwy\fR.
69 Reports buffer activity:
73 \fBbread/s, bwrit/s\fR
76 transfers per second of data between system buffers and disk or other block
83 \fBlread/s, lwrit/s\fR
86 accesses of system buffers.
92 \fB%rcache, %wcache\fR
95 cache hit ratios, that is, (1\(mibread/lread) as a percentage.
101 \fBpread/s, pwrit/s\fR
104 transfers using raw (physical) device mechanism.
107 If run in a non-global zone and the pools facility is active, these values
108 reflect activity on the processors of the processor set of the pool to which
118 Reports system calls:
126 system calls of all types.
132 \fBsread/s, swrit/s, fork/s, exec/s\fR
136 specific system calls.
142 \fBrchar/s, wchar/s\fR
146 characters transferred by read and write system calls. No incoming or outgoing
147 \fBexec\fR(2) and \fBfork\fR(2) calls are reported.
150 If run in a non-global zone and the pools facility is active, these values
151 reflect activity on the processors of the processor set of the pool to which
161 Reports activity for each block device (for example, disk or tape drive) with
162 the exception of \fBXDC\fR disks and tape drives. When data is displayed, the
163 device specification \fIdsk-\fR is generally used to represent a disk drive.
164 The device specification used to represent a tape drive is machine dependent.
165 The activity data reported is:
172 portion of time device was busy servicing a transfer request, average number of
173 requests outstanding during that time.
179 \fBread/s, write/s, blks/s\fR
182 number of read/write transfers from or to device, number of bytes transferred
192 average wait time in milliseconds.
201 average service time in milliseconds.
204 For more general system statistics, use \fBiostat\fR(1M), \fBsar\fR(1M), or
207 See \fISystem Administration Guide: Advanced Administration\fR for naming
208 conventions for disks.
214 \fB\fB-e\fR \fItime\fR\fR
217 Selects data up to \fBtime\fR. Default is \fB18:00\fR.
223 \fB\fB-f\fR \fIfilename\fR\fR
226 Uses \fIfilename\fR as the data source for \fBsar\fR. Default is the current
227 daily data file \fB/var/adm/sa/sa\fR\fIdd.\fR
236 Reports paging activities:
243 page-out requests per second.
252 pages paged-out per second.
261 pages per second placed on the free list by the page stealing daemon.
270 pages per second scanned by the page stealing daemon.
279 the percentage of \fBUFS\fR inodes taken off the freelist by iget which had
280 reusable pages associated with them. These pages are flushed and cannot be
281 reclaimed by processes. Thus, this is the percentage of igets with page
285 If run in a non-global zone and the pools facility is active, these values
286 reflect activity on the processors of the processor set of the pool to which
293 \fB\fB-i\fR \fIsec\fR\fR
296 Selects data at intervals as close as possible to \fIsec\fR seconds.
305 Reports kernel memory allocation (KMA) activities:
309 \fBsml_mem, alloc, fail\fR
312 information about the memory pool reserving and allocating space for small
313 requests: the amount of memory in bytes \fBKMA\fR has for the small pool, the
314 number of bytes allocated to satisfy requests for small amounts of memory, and
315 the number of requests for small amounts of memory that were not satisfied
322 \fBlg_mem, alloc, fail\fR
325 information for the large memory pool (analogous to the information for the
332 \fBovsz_alloc, fail\fR
335 the amount of memory allocated for oversize requests and the number of oversize
336 requests which could not be satisfied (because oversized memory is allocated
337 dynamically, there is not a pool).
348 Reports message and semaphore activities:
355 primitives per second.
358 If run in a non-global zone and the pools facility is active, these values
359 reflect activity on the processors of the processor set of the pool to which
366 \fB\fB-o\fR \fIfilename\fR\fR
369 Saves samples in file, \fIfilename\fR, in binary format.
378 Reports paging activities:
385 page faults per second that are satisfied by reclaiming a page currently in
386 memory (attaches per second).
395 page-in requests per second.
404 pages paged-in per second.
413 page faults from protection errors per second (illegal access to page) or
423 address translation page faults per second (valid page not in memory).
432 faults per second caused by software lock requests requiring physical
436 If run in a non-global zone and the pools facility is active, these values
437 reflect activity on the processors of the processor set of the pool to which
447 Reports average queue length while occupied, and percent of time occupied:
451 \fBrunq-sz, %runocc\fR
454 Run queue of kernel threads in memory and runnable
460 \fBswpq-sz, %swpocc\fR
463 Swap queue of processes
474 Reports unused memory pages and disk blocks:
481 average pages available to user processes.
490 disk blocks available for page swapping.
498 \fB\fB-s\fR \fItime\fR\fR
501 Selects data later than \fBtime\fR in the form \fIhh\fR[:\fImm\fR]. Default is
511 Reports \fBCPU\fR utilization (the default):
515 \fB%usr, %sys, %wio, %idle\fR
518 portion of time running in user mode, running in system mode, idle with some
519 process waiting for block \fBI/O\fR, and otherwise idle.
522 If run in a non-global zone and the pools facility is active, these values
523 reflect activity on the processors of the processor set of the pool to which
533 Reports status of process, i-node, file tables:
537 \fBproc-sz, inod-sz, file-sz, lock-sz\fR
541 entries/size for each table, evaluated once at sampling point.
551 overflows that occur between sampling points for each table.
562 Reports system swapping and switching activity:
566 \fBswpin/s, swpot/s, bswin/s, bswot/s\fR
570 number of transfers and number of 512-byte units transferred for swapins and
571 swapouts (including initial loading of some programs).
584 If run in a non-global zone and the pools facility is active, these values
585 reflect activity on the processors of the processor set of the pool to which
595 Reports TTY device activity:
599 \fBrawch/s, canch/s, outch/s\fR
602 input character rate, input character rate processed by canon, output character
609 \fBrcvin/s, xmtin/s, mdmin/s\fR
612 receive, transmit and modem interrupt rates.
615 If run in a non-global zone and the pools facility is active, these values
616 reflect activity on the processors of the processor set of the pool to which
622 \fBExample 1 \fRViewing System Activity
625 The following example displays today's \fBCPU\fR activity so far:
636 \fBExample 2 \fRWatching System Activity Evolve
639 To watch \fBCPU\fR activity evolve for 10 minutes and save data:
644 example% sar -o temp 60 10
650 \fBExample 3 \fRReviewing Disk and Tape Activity
653 To later review disk and tape activity from that period:
658 example% sar -d -f temp
666 \fB\fB/var/adm/sa/sa\fIdd\fR\fR\fR
669 daily data file, where \fIdd\fR are digits representing the day of the month
674 \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M), \fBexec\fR(2),
675 \fBfork\fR(2), \fBattributes\fR(5)
678 \fISystem Administration Guide: Advanced Administration\fR
681 The sum of CPU utilization might vary slightly from 100 because of rounding
682 errors in the production of a percentage figure.