8212 manpages contain obsolete references
[unleashed.git] / usr / src / man / man1 / sar.1
blob9318d3d394301904afb751a03e5730921cf3edf1
1 '\" te
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"
8 .SH NAME
9 sar \- system activity reporter
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-o\fR \fIfilename\fR] \fIt\fR [\fIn\fR]
14 .fi
16 .LP
17 .nf
18 \fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-e\fR \fItime\fR] [\fB-f\fR \fIfilename\fR] [\fB-i\fR \fIsec\fR]
19      [\fB-s\fR \fItime\fR]
20 .fi
22 .SH DESCRIPTION
23 .LP
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
31 \fB1\fR.
32 .sp
33 .LP
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.
42 .SH OPTIONS
43 .LP
44 The following options modify the subsets of information reported by \fBsar\fR.
45 .sp
46 .ne 2
47 .na
48 \fB\fB-a\fR\fR
49 .ad
50 .RS 15n
51 Reports use of file access system routines: iget/s, namei/s, dirblk/s
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fB-A\fR\fR
58 .ad
59 .RS 15n
60 Reports all data. Equivalent to \fB-abcdgkmpqruvwy\fR.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fB-b\fR\fR
67 .ad
68 .RS 15n
69 Reports buffer activity:
70 .sp
71 .ne 2
72 .na
73 \fBbread/s, bwrit/s\fR
74 .ad
75 .RS 20n
76 transfers per second of data between system buffers and disk or other block
77 devices.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fBlread/s, lwrit/s\fR
84 .ad
85 .RS 20n
86 accesses of system buffers.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB%rcache, %wcache\fR
93 .ad
94 .RS 20n
95 cache hit ratios, that is, (1\(mibread/lread) as a percentage.
96 .RE
98 .sp
99 .ne 2
101 \fBpread/s, pwrit/s\fR
103 .RS 20n
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
109 the zone is bound.
113 .ne 2
115 \fB\fB-c\fR\fR
117 .RS 15n
118 Reports system calls:
120 .ne 2
122 \fBscall/s\fR
124 .sp .6
125 .RS 4n
126 system calls of all types.
130 .ne 2
132 \fBsread/s, swrit/s, fork/s, exec/s\fR
134 .sp .6
135 .RS 4n
136 specific system calls.
140 .ne 2
142 \fBrchar/s, wchar/s\fR
144 .sp .6
145 .RS 4n
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
152 the zone is bound.
156 .ne 2
158 \fB\fB-d\fR\fR
160 .RS 15n
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:
167 .ne 2
169 \fB%busy, avque\fR
171 .RS 27n
172 portion of time device was busy servicing a transfer request, average number of
173 requests outstanding during that time.
177 .ne 2
179 \fBread/s, write/s, blks/s\fR
181 .RS 27n
182 number of read/write transfers from or to device, number of bytes transferred
183 in 512-byte units.
187 .ne 2
189 \fBavwait\fR
191 .RS 27n
192 average wait time in milliseconds.
196 .ne 2
198 \fBavserv\fR
200 .RS 27n
201 average service time in milliseconds.
204 For more general system statistics, use \fBiostat\fR(1M), \fBsar\fR(1M), or
205 \fBvmstat\fR(1M).
207 See \fISystem Administration Guide: Advanced Administration\fR for naming
208 conventions for disks.
212 .ne 2
214 \fB\fB-e\fR \fItime\fR\fR
216 .RS 15n
217 Selects data up to \fBtime\fR. Default is \fB18:00\fR.
221 .ne 2
223 \fB\fB-f\fR \fIfilename\fR\fR
225 .RS 15n
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
231 .ne 2
233 \fB\fB-g\fR\fR
235 .RS 15n
236 Reports paging activities:
238 .ne 2
240 \fBpgout/s\fR
242 .RS 12n
243 page-out requests per second.
247 .ne 2
249 \fBppgout/s\fR
251 .RS 12n
252 pages paged-out per second.
256 .ne 2
258 \fBpgfree/s\fR
260 .RS 12n
261 pages per second placed on the free list by the page stealing daemon.
265 .ne 2
267 \fBpgscan/s\fR
269 .RS 12n
270 pages per second scanned by the page stealing daemon.
274 .ne 2
276 \fB%ufs_ipf\fR
278 .RS 12n
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
282 flushes.
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
287 the zone is bound.
291 .ne 2
293 \fB\fB-i\fR \fIsec\fR\fR
295 .RS 15n
296 Selects data at intervals as close as possible to \fIsec\fR seconds.
300 .ne 2
302 \fB\fB-k\fR\fR
304 .RS 15n
305 Reports kernel memory allocation (KMA) activities:
307 .ne 2
309 \fBsml_mem, alloc, fail\fR
311 .RS 24n
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
316 (failed).
320 .ne 2
322 \fBlg_mem, alloc, fail\fR
324 .RS 24n
325 information for the large memory pool (analogous to the information for the
326 small memory pool).
330 .ne 2
332 \fBovsz_alloc, fail\fR
334 .RS 24n
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).
343 .ne 2
345 \fB\fB-m\fR\fR
347 .RS 15n
348 Reports message and semaphore activities:
350 .ne 2
352 \fBmsg/s, sema/s\fR
354 .RS 17n
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
360 the zone is bound.
364 .ne 2
366 \fB\fB-o\fR \fIfilename\fR\fR
368 .RS 15n
369 Saves samples in file, \fIfilename\fR, in binary format.
373 .ne 2
375 \fB\fB-p\fR\fR
377 .RS 15n
378 Reports paging activities:
380 .ne 2
382 \fBatch/s\fR
384 .RS 11n
385 page faults per second that are satisfied by reclaiming a page currently in
386 memory (attaches per second).
390 .ne 2
392 \fBpgin/s\fR
394 .RS 11n
395 page-in requests per second.
399 .ne 2
401 \fBppgin/s\fR
403 .RS 11n
404 pages paged-in per second.
408 .ne 2
410 \fBpflt/s\fR
412 .RS 11n
413 page faults from protection errors per second (illegal access to page) or
414 "copy-on-writes".
418 .ne 2
420 \fBvflt/s\fR
422 .RS 11n
423 address translation page faults per second (valid page not in memory).
427 .ne 2
429 \fBslock/s\fR
431 .RS 11n
432 faults per second caused by software lock requests requiring physical
433 \fBI/O\fR.
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
438 the zone is bound.
442 .ne 2
444 \fB\fB-q\fR\fR
446 .RS 15n
447 Reports average queue length while occupied, and percent of time occupied:
449 .ne 2
451 \fBrunq-sz, %runocc\fR
453 .RS 20n
454 Run queue of kernel threads in memory and runnable
458 .ne 2
460 \fBswpq-sz, %swpocc\fR
462 .RS 20n
463 Swap queue of processes
469 .ne 2
471 \fB\fB-r\fR\fR
473 .RS 15n
474 Reports unused memory pages and disk blocks:
476 .ne 2
478 \fBfreemem\fR
480 .RS 12n
481 average pages available to user processes.
485 .ne 2
487 \fBfreeswap\fR
489 .RS 12n
490 disk blocks available for page swapping.
496 .ne 2
498 \fB\fB-s\fR \fItime\fR\fR
500 .RS 15n
501 Selects data later than \fBtime\fR in the form \fIhh\fR[:\fImm\fR]. Default is
502 \fB08:00\fR.
506 .ne 2
508 \fB\fB-u\fR\fR
510 .RS 15n
511 Reports \fBCPU\fR utilization (the default):
513 .ne 2
515 \fB%usr, %sys, %wio, %idle\fR
517 .RS 27n
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
524 the zone is bound.
528 .ne 2
530 \fB\fB-v\fR\fR
532 .RS 15n
533 Reports status of process, i-node, file tables:
535 .ne 2
537 \fBproc-sz, inod-sz, file-sz, lock-sz\fR
539 .sp .6
540 .RS 4n
541 entries/size for each table, evaluated once at sampling point.
545 .ne 2
547 \fBov\fR
549 .sp .6
550 .RS 4n
551 overflows that occur between sampling points for each table.
557 .ne 2
559 \fB\fB-w\fR\fR
561 .RS 15n
562 Reports system swapping and switching activity:
564 .ne 2
566 \fBswpin/s, swpot/s, bswin/s, bswot/s\fR
568 .sp .6
569 .RS 4n
570 number of transfers and number of 512-byte units transferred for swapins and
571 swapouts (including initial loading of some programs).
575 .ne 2
577 \fBpswch/s\fR
579 .sp .6
580 .RS 4n
581 process switches.
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
586 the zone is bound.
590 .ne 2
592 \fB\fB-y\fR\fR
594 .RS 15n
595 Reports TTY device activity:
597 .ne 2
599 \fBrawch/s, canch/s, outch/s\fR
601 .RS 29n
602 input character rate, input character rate processed by canon, output character
603 rate.
607 .ne 2
609 \fBrcvin/s, xmtin/s, mdmin/s\fR
611 .RS 29n
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
617 the zone is bound.
620 .SH EXAMPLES
622 \fBExample 1 \fRViewing System Activity
625 The following example displays today's \fBCPU\fR activity so far:
628 .in +2
630 example% sar
632 .in -2
636 \fBExample 2 \fRWatching System Activity Evolve
639 To watch \fBCPU\fR activity evolve for 10 minutes and save data:
642 .in +2
644 example% sar -o temp 60 10
646 .in -2
650 \fBExample 3 \fRReviewing Disk and Tape Activity
653 To later review disk and tape activity from that period:
656 .in +2
658 example% sar -d -f temp
660 .in -2
663 .SH FILES
664 .ne 2
666 \fB\fB/var/adm/sa/sa\fIdd\fR\fR\fR
668 .RS 20n
669 daily data file, where \fIdd\fR are digits representing the day of the month
672 .SH SEE ALSO
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
679 .SH NOTES
681 The sum of CPU utilization might vary slightly from 100 because of rounding
682 errors in the production of a percentage figure.