1sar(1) User Commands sar(1)
2
3
4
6 sar - system activity reporter
7
9 sar [-aAbcdgkmpqruvwy] [-o filename] t [n]
10
11
12 sar [-aAbcdgkmpqruvwy] [-e time] [-f filename] [-i sec]
13 [-s time]
14
15
17 In the first instance, the sar utility samples cumulative activity
18 counters in the operating system at n intervals of t seconds, where t
19 should be 5 or greater. If t is specified with more than one option,
20 all headers are printed together and the output can be difficult to
21 read. (If the sampling interval is less than 5, the activity of sar
22 itself can affect the sample.) If the -o option is specified, it saves
23 the samples in filename in binary format. The default value of n is 1.
24
25
26 In the second instance, no sampling interval is specified. sar extracts
27 data from a previously recorded filename, either the one specified by
28 the -f option or, by default, the standard system activity daily data
29 file /var/adm/sa/sadd for the current day dd. The starting and ending
30 times of the report can be bounded using the -e and -s arguments with
31 time specified in the form hh[:mm[:ss]]. The -i option selects records
32 at sec second intervals. Otherwise, all intervals found in the data
33 file are reported.
34
36 The following options modify the subsets of information reported by
37 sar.
38
39 -a Reports use of file access system routines: iget/s,
40 namei/s, dirblk/s
41
42
43 -A Reports all data. Equivalent to -abcdgkmpqruvwy.
44
45
46 -b Reports buffer activity:
47
48 bread/s, bwrit/s transfers per second of data between
49 system buffers and disk or other
50 block devices.
51
52
53 lread/s, lwrit/s accesses of system buffers.
54
55
56 %rcache, %wcache cache hit ratios, that is,
57 (1−bread/lread) as a percentage.
58
59
60 pread/s, pwrit/s transfers using raw (physical)
61 device mechanism.
62
63 If run in a non-global zone and the pools facility is
64 active, these values reflect activity on the processors
65 of the processor set of the pool to which the zone is
66 bound.
67
68
69 -c Reports system calls:
70
71 scall/s
72
73 system calls of all types.
74
75
76 sread/s, swrit/s, fork/s, exec/s
77
78 specific system calls.
79
80
81 rchar/s, wchar/s
82
83 characters transferred by read and write system
84 calls. No incoming or outgoing exec(2) and fork(2)
85 calls are reported.
86
87 If run in a non-global zone and the pools facility is
88 active, these values reflect activity on the processors
89 of the processor set of the pool to which the zone is
90 bound.
91
92
93 -d Reports activity for each block device (for example,
94 disk or tape drive) with the exception of XDC disks and
95 tape drives. When data is displayed, the device specifi‐
96 cation dsk- is generally used to represent a disk drive.
97 The device specification used to represent a tape drive
98 is machine dependent. The activity data reported is:
99
100 %busy, avque portion of time device was
101 busy servicing a transfer
102 request, average number of
103 requests outstanding during
104 that time.
105
106
107 read/s, write/s, blks/s number of read/write trans‐
108 fers from or to device, num‐
109 ber of bytes transferred in
110 512-byte units.
111
112
113 avwait average wait time in mil‐
114 liseconds.
115
116
117 avserv average service time in mil‐
118 liseconds.
119
120 For more general system statistics, use iostat(1M),
121 sar(1M), or vmstat(1M).
122
123 See System Administration Guide: Advanced Administration
124 for naming conventions for disks.
125
126
127 -e time Selects data up to time. Default is 18:00.
128
129
130 -f filename Uses filename as the data source for sar. Default is the
131 current daily data file /var/adm/sa/sadd.
132
133
134 -g Reports paging activities:
135
136 pgout/s page-out requests per second.
137
138
139 ppgout/s pages paged-out per second.
140
141
142 pgfree/s pages per second placed on the free list by
143 the page stealing daemon.
144
145
146 pgscan/s pages per second scanned by the page steal‐
147 ing daemon.
148
149
150 %ufs_ipf the percentage of UFS inodes taken off the
151 freelist by iget which had reusable pages
152 associated with them. These pages are
153 flushed and cannot be reclaimed by pro‐
154 cesses. Thus, this is the percentage of
155 igets with page flushes.
156
157 If run in a non-global zone and the pools facility is
158 active, these values reflect activity on the processors
159 of the processor set of the pool to which the zone is
160 bound.
161
162
163 -i sec Selects data at intervals as close as possible to sec
164 seconds.
165
166
167 -k Reports kernel memory allocation (KMA) activities:
168
169 sml_mem, alloc, fail information about the memory
170 pool reserving and allocating
171 space for small requests: the
172 amount of memory in bytes KMA
173 has for the small pool, the num‐
174 ber of bytes allocated to sat‐
175 isfy requests for small amounts
176 of memory, and the number of
177 requests for small amounts of
178 memory that were not satisfied
179 (failed).
180
181
182 lg_mem, alloc, fail information for the large memory
183 pool (analogous to the informa‐
184 tion for the small memory pool).
185
186
187 ovsz_alloc, fail the amount of memory allocated
188 for oversize requests and the
189 number of oversize requests
190 which could not be satisfied
191 (because oversized memory is
192 allocated dynamically, there is
193 not a pool).
194
195
196
197 -m Reports message and semaphore activities:
198
199 msg/s, sema/s primitives per second.
200
201 If run in a non-global zone and the pools facility is
202 active, these values reflect activity on the processors
203 of the processor set of the pool to which the zone is
204 bound.
205
206
207 -o filename Saves samples in file, filename, in binary format.
208
209
210 -p Reports paging activities:
211
212 atch/s page faults per second that are satisfied by
213 reclaiming a page currently in memory
214 (attaches per second).
215
216
217 pgin/s page-in requests per second.
218
219
220 ppgin/s pages paged-in per second.
221
222
223 pflt/s page faults from protection errors per second
224 (illegal access to page) or "copy-on-writes".
225
226
227 vflt/s address translation page faults per second
228 (valid page not in memory).
229
230
231 slock/s faults per second caused by software lock
232 requests requiring physical I/O.
233
234 If run in a non-global zone and the pools facility is
235 active, these values reflect activity on the processors
236 of the processor set of the pool to which the zone is
237 bound.
238
239
240 -q Reports average queue length while occupied, and percent
241 of time occupied:
242
243 runq-sz, %runocc Run queue of kernel threads in mem‐
244 ory and runnable
245
246
247 swpq-sz, %swpocc Swap queue of processes
248
249
250
251 -r Reports unused memory pages and disk blocks:
252
253 freemem average pages available to user processes.
254
255
256 freeswap disk blocks available for page swapping.
257
258
259
260 -s time Selects data later than time in the form hh[:mm].
261 Default is 08:00.
262
263
264 -u Reports CPU utilization (the default):
265
266 %usr, %sys, %wio, %idle portion of time running in
267 user mode, running in system
268 mode, idle with some process
269 waiting for block I/O, and
270 otherwise idle.
271
272 If run in a non-global zone and the pools facility is
273 active, these values reflect activity on the processors
274 of the processor set of the pool to which the zone is
275 bound.
276
277
278 -v Reports status of process, i-node, file tables:
279
280 proc-sz, inod-sz, file-sz, lock-sz
281
282 entries/size for each table, evaluated once at sam‐
283 pling point.
284
285
286 ov
287
288 overflows that occur between sampling points for
289 each table.
290
291
292
293 -w Reports system swapping and switching activity:
294
295 swpin/s, swpot/s, bswin/s, bswot/s
296
297 number of transfers and number of 512-byte units
298 transferred for swapins and swapouts (including ini‐
299 tial loading of some programs).
300
301
302 pswch/s
303
304 process switches.
305
306 If run in a non-global zone and the pools facility is
307 active, these values reflect activity on the processors
308 of the processor set of the pool to which the zone is
309 bound.
310
311
312 -y Reports TTY device activity:
313
314 rawch/s, canch/s, outch/s input character rate, input
315 character rate processed by
316 canon, output character
317 rate.
318
319
320 rcvin/s, xmtin/s, mdmin/s receive, transmit and modem
321 interrupt rates.
322
323 If run in a non-global zone and the pools facility is
324 active, these values reflect activity on the processors
325 of the processor set of the pool to which the zone is
326 bound.
327
328
330 Example 1 Viewing System Activity
331
332
333 The following example displays today's CPU activity so far:
334
335
336 example% sar
337
338
339
340 Example 2 Watching System Activity Evolve
341
342
343 To watch CPU activity evolve for 10 minutes and save data:
344
345
346 example% sar -o temp 60 10
347
348
349
350 Example 3 Reviewing Disk and Tape Activity
351
352
353 To later review disk and tape activity from that period:
354
355
356 example% sar -d -f temp
357
358
359
361 /var/adm/sa/sadd daily data file, where dd are digits representing
362 the day of the month
363
364
366 See attributes(5) for descriptions of the following attributes:
367
368
369
370
371 ┌─────────────────────────────┬─────────────────────────────┐
372 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
373 ├─────────────────────────────┼─────────────────────────────┤
374 │Availability │SUNWaccu │
375 └─────────────────────────────┴─────────────────────────────┘
376
378 sag(1), iostat(1M), sar(1M), vmstat(1M), exec(2), fork(2),
379 attributes(5)
380
381
382 System Administration Guide: Advanced Administration
383
385 The sum of CPU utilization might vary slightly from 100 because of
386 rounding errors in the production of a percentage figure.
387
388
389
390SunOS 5.11 24 Jul 2004 sar(1)