summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/sar.1
blob: 8b31978d607cd6558df94b93199f3787bfeb8ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
'\" 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 "May 13, 2017"
.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
.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
.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(8), \fBsar\fR(8), or
\fBvmstat\fR(8).
.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
.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
.LP
.BR exec (2),
.BR fork (2),
.BR attributes (7),
.BR iostat (8),
.BR sar (8),
.BR vmstat (8)
.sp
.LP
\fISystem Administration Guide: Advanced Administration\fR
.SH NOTES
.LP
The sum of CPU utilization might vary slightly from 100 because of rounding
errors in the production of a percentage figure.