Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/prstat.1m.man.txt
+++ new/usr/src/man/man1m/prstat.1m.man.txt
1 1 PRSTAT(1M) Maintenance Commands PRSTAT(1M)
2 2
3 3
4 4
5 5 NAME
6 6 prstat - report active process statistics
7 7
8 8 SYNOPSIS
9 9 prstat [-acHJLmRrtTvWZ] [-d u | d] [-C psrsetlist] [-h lgrplist]
10 10 [-j projlist] [-k tasklist] [-n ntop[,nbottom]]
11 11 [-p pidlist] [-P cpulist] [-s key | -S key ]
12 12 [-u euidlist] [-U uidlist] [-z zoneidlist]
13 13 [interval [count]]
14 14
15 15
16 16 DESCRIPTION
17 17 The prstat utility iteratively examines all active processes on the
18 18 system and reports statistics based on the selected output mode and
19 19 sort order. prstat provides options to examine only processes matching
20 20 specified PIDs, UIDs, zone IDs, CPU IDs, and processor set IDs.
21 21
22 22
23 23 The -j, -k, -C, -p, -P, -u, -U, and -z options accept lists as
24 24 arguments. Items in a list can be either separated by commas or
25 25 enclosed in quotes and separated by commas or spaces.
26 26
27 27
28 28 If you do not specify an option, prstat examines all processes and
29 29 reports statistics sorted by CPU usage.
30 30
31 31 OPTIONS
32 32 The following options are supported:
33 33
34 34 -a
35 35
36 36 Report information about processes and users. In this mode prstat
37 37 displays separate reports about processes and users at the same
38 38 time.
39 39
40 40
41 41 -c
42 42
43 43 Print new reports below previous reports instead of overprinting
44 44 them. Long names are not truncated in this mode.
45 45
46 46
47 47 -C psrsetlist
48 48
49 49 Report only processes or lwps that are bound to processor sets in
50 50 the given list. Each processor set is identified by an integer as
51 51 reported by psrset(1M). The load averages displayed are the sum of
52 52 the load averages of the specified processor sets (see
53 53 pset_getloadavg(3C)). Processes with one or more LWPs bound to
54 54 processor sets in the given list are reported even when the -L
55 55 option is not used.
56 56
57 57
58 58 -d u | d
59 59
60 60 Specify u for a printed representation of the internal
61 61 representation of time. See time(2). Specify d for standard date
62 62 format. See date(1).
63 63
64 64
65 65 -h lgrplist
66 66
67 67 Report only processes or lwps whose home lgroup is in the given
68 68 list of lgroups. No processes or lwps will be listed for invalid
69 69 lgroups.
70 70
71 71
72 72 -H
73 73
74 74 Report information about home lgroup. In this mode, prstat adds an
75 75 extra column showing process or lwps home lgroup with the header
76 76 LGRP.
77 77
78 78
79 79 -j projlist
80 80
81 81 Report only processes or lwps whose project ID is in the given
82 82 list. Each project ID can be specified as either a project name or
83 83 a numerical project ID. See project(4).
84 84
85 85
86 86 -J
87 87
88 88 Report information about processes and projects. In this mode
89 89 prstat displays separate reports about processes and projects at
90 90 the same time. A trailing asterisk marks a long name that has been
91 91 truncated to fit the column.
92 92
93 93
94 94 -k tasklist
95 95
96 96 Report only processes or lwps whose task ID is in tasklist.
97 97
98 98
99 99 -L
100 100
101 101 Report statistics for each light-weight process (LWP). By default,
102 102 prstat reports only the number of LWPs for each process.
103 103
104 104
105 105 -m
106 106
107 107 Report microstate process accounting information. In addition to
108 108 all fields listed in -v mode, this mode also includes the
109 109 percentage of time the process has spent processing system traps,
110 110 text page faults, data page faults, waiting for user locks and
111 111 waiting for CPU (latency time).
112 112
113 113
114 114 -n ntop[,nbottom]
115 115
116 116 Restrict number of output lines. The ntop argument determines how
117 117 many lines of process or lwp statistics are reported, and the
118 118 nbottom argument determines how many lines of user, task, project
119 119 or zone statistics are reported if the -a, -t, -T, -J or -Z options
120 120 are specified. By default, prstat displays as many lines of output
121 121 that fit in a window or terminal. When you specify the -c option or
122 122 direct the output to a file, the default values for ntop and
123 123 nbottom are 15 and 5.
124 124
125 125
126 126 -p pidlist
127 127
128 128 Report only processes whose process ID is in the given list.
129 129
130 130
131 131 -P cpulist
132 132
133 133 Report only processes or lwps which have most recently executed on
134 134 a CPU in the given list. Each CPU is identified by an integer as
135 135 reported by psrinfo(1M).
136 136
137 137
138 138 -R
139 139
140 140 Put prstat in the real time scheduling class. When this option is
141 141 used, prstat is given priority over time-sharing and interactive
142 142 processes. This option is available only for superuser.
143 143
144 144
145 145 -r
146 146
147 147 Disable lookups for user names and project names. (Note that this
148 148 does not apply to lookups for the -j, -u, or -U options.)
149 149
150 150
151 151 -s key
152 152
153 153 Sort output lines (that is, processes, lwps, or users) by key in
154 154 descending order. Only one key can be used as an argument.
155 155
156 156 There are five possible key values:
157 157
158 158 cpu
159 159
160 160 Sort by process CPU usage. This is the default.
161 161
162 162
163 163 pri
164 164
165 165 Sort by process priority.
166 166
167 167
168 168 rss
169 169
170 170 Sort by resident set size.
171 171
172 172
173 173 size
174 174
175 175 Sort by size of process image.
176 176
177 177
178 178 time
179 179
180 180 Sort by process execution time.
181 181
182 182
183 183
184 184 -S key
185 185
186 186 Sort output lines by key in ascending order. Possible key values
187 187 are the same as for the -s option. See -s.
188 188
189 189
190 190 -t
191 191
192 192 Report total usage summary for each user. The summary includes the
193 193 total number of processes or LWPs owned by the user, total size of
194 194 process images, total resident set size, total cpu time, and
195 195 percentages of recent cpu time and system memory.
196 196
197 197
198 198 -T
199 199
200 200 Report information about processes and tasks. In this mode prstat
201 201 displays separate reports about processes and tasks at the same
202 202 time.
203 203
204 204
205 205 -u euidlist
206 206
207 207 Report only processes whose effective user ID is in the given list.
208 208 Each user ID may be specified as either a login name or a numerical
209 209 user ID.
210 210
211 211
212 212 -U uidlist
213 213
214 214 Report only processes whose real user ID is in the given list. Each
215 215 user ID may be specified as either a login name or a numerical user
216 216 ID.
217 217
218 218
219 219 -v
220 220
221 221 Report verbose process usage. This output format includes the
222 222 percentage of time the process has spent in user mode, in system
223 223 mode, and sleeping. It also includes the number of voluntary and
224 224 involuntary context switches, system calls and the number of
225 225 signals received. Statistics that are not reported are marked with
226 226 the - sign.
227 227
228 228
229 229 -W
230 230
231 231 Truncate long names even when prstat would normally print them in
232 232 full. A trailing asterisk marks a long name that has been
233 233 truncated to fit the column.
234 234
235 235
236 236 -z zoneidlist
237 237
238 238 Report only processes or LWPs whose zone ID is in the given list.
239 239 Each zone ID can be specified as either a zone name or a numerical
240 240 zone ID. See zones(5).
241 241
242 242
243 243 -Z
244 244
245 245 Report information about processes and zones. In this mode, prstat
246 246 displays separate reports about processes and zones at the same
247 247 time. A trailing asterisk marks a long name that has been
248 248 truncated to fit the column.
249 249
250 250
251 251 OUTPUT
252 252 The following list defines the column headings and the meanings of a
253 253 prstat report:
254 254
255 255 PID
256 256
257 257 The process ID of the process.
258 258
259 259
260 260 USERNAME
261 261
262 262 The real user (login) name or real user ID. A trailing asterisk
263 263 marks a long name that has been truncated to fit the column.
264 264
265 265
266 266 SWAP
267 267
268 268 The total virtual memory size of the process, including all mapped
269 269 files and devices, in kilobytes (K), megabytes (M), or gigabytes
270 270 (G).
271 271
272 272
273 273 RSS
274 274
275 275 The resident set size of the process (RSS), in kilobytes (K),
276 276 megabytes (M), or gigabytes (G). The RSS value is an estimate
277 277 provided by proc(4) that might underestimate the actual resident
278 278 set size. Users who want to get more accurate usage information for
279 279 capacity planning should use the -x option to pmap(1) instead.
280 280
281 281
282 282 STATE
283 283
284 284 The state of the process:
285 285
286 286 cpuN
287 287
288 288 Process is running on CPU N.
289 289
290 290
291 291 sleep
292 292
293 293 Sleeping: process is waiting for an event to complete.
294 294
295 295
296 296 wait
297 297
298 298 Waiting: process is waiting for CPU usage to drop to the CPU-
299 299 caps enforced limits. See the description of CPU-caps in
300 300 resource_controls(5).
301 301
302 302
303 303 run
304 304
305 305 Runnable: process in on run queue.
306 306
307 307
308 308 zombie
309 309
310 310 Zombie state: process terminated and parent not waiting.
311 311
312 312
313 313 stop
314 314
315 315 Process is stopped.
316 316
317 317
318 318
319 319 PRI
320 320
321 321 The priority of the process. Larger numbers mean higher priority.
322 322
323 323
324 324 NICE
325 325
326 326 Nice value used in priority computation. Only processes in certain
327 327 scheduling classes have a nice value.
328 328
329 329
330 330 TIME
331 331
332 332 The cumulative execution time for the process.
333 333
334 334
335 335 CPU
336 336
337 337 The percentage of recent CPU time used by the process. If executing
↓ open down ↓ |
337 lines elided |
↑ open up ↑ |
338 338 in a non-global zone and the pools facility is active, the
339 339 percentage will be that of the processors in the processor set in
340 340 use by the pool to which the zone is bound.
341 341
342 342
343 343 PROCESS
344 344
345 345 The name of the process (name of executed file).
346 346
347 347
348 - LWPID
348 + LWP
349 349
350 - The lwp ID of the lwp being reported.
350 + The lwp ID of the lwp being reported, as well as the LWP name if
351 + any is set.
351 352
352 353
353 354 NLWP
354 355
355 356 The number of lwps in the process.
356 357
357 358
358 359
359 360 With the some options, in addition to a number of the column headings
360 361 shown above, there are:
361 362
362 363 NPROC
363 364
364 365 Number of processes in a specified collection.
365 366
366 367
367 368 MEMORY
368 369
369 370 Percentage of memory used by a specified collection of processes.
370 371
371 372
372 373
373 374 The following columns are displayed when the -v or -m option is
374 375 specified
375 376
376 377 USR
377 378
378 379 The percentage of time the process has spent in user mode.
379 380
380 381
381 382 SYS
382 383
383 384 The percentage of time the process has spent in system mode.
384 385
385 386
386 387 TRP
387 388
388 389 The percentage of time the process has spent in processing system
389 390 traps.
390 391
391 392
392 393 TFL
393 394
394 395 The percentage of time the process has spent processing text page
395 396 faults.
396 397
397 398
398 399 DFL
399 400
400 401 The percentage of time the process has spent processing data page
401 402 faults.
402 403
403 404
404 405 LCK
405 406
406 407 The percentage of time the process has spent waiting for user
407 408 locks.
408 409
409 410
410 411 SLP
411 412
412 413 The percentage of time the process has spent sleeping.
413 414
414 415
415 416 LAT
416 417
417 418 The percentage of time the process has spent waiting for CPU.
418 419
419 420
420 421 VCX
421 422
422 423 The number of voluntary context switches.
423 424
424 425
425 426 ICX
426 427
427 428 The number of involuntary context switches.
428 429
429 430
430 431 SCL
431 432
432 433 The number of system calls.
433 434
434 435
435 436 SIG
436 437
437 438 The number of signals received.
438 439
439 440
440 441
441 442 Under the -L option, one line is printed for each lwp in the process
442 443 and some reporting fields show the values for the lwp, not the process.
443 444
444 445
445 446 The following column is displayed when the -H option is specified:
446 447
447 448 LGRP
448 449
449 450 The home lgroup of the process or lwp.
450 451
451 452
452 453 OPERANDS
453 454 The following operands are supported:
454 455
455 456 count
456 457
457 458 Specifies the number of times that the statistics are repeated. By
458 459 default, prstat reports statistics until a termination signal is
459 460 received.
460 461
461 462
462 463 interval
463 464
464 465 Specifies the sampling interval in seconds; the default interval is
465 466 5 seconds.
466 467
467 468
468 469 EXAMPLES
469 470 Example 1 Reporting the Five Most Active Super-User Processes
470 471
471 472
472 473 The following command reports the five most active super-user processes
473 474 running on CPU1 and CPU2:
474 475
475 476
476 477 example% prstat -u root -n 5 -P 1,2 1 1
477 478
478 479 PID USERNAME SWAP RSS STATE PRI NICE TIME CPU PROCESS/LWP
479 480 306 root 3024K 1448K sleep 58 0 0:00.00 0.3% sendmail/1
480 481 102 root 1600K 592K sleep 59 0 0:00.00 0.1% in.rdisc/1
481 482 250 root 1000K 552K sleep 58 0 0:00.00 0.0% utmpd/1
482 483 288 root 1720K 1032K sleep 58 0 0:00.00 0.0% sac/1
483 484 1 root 744K 168K sleep 58 0 0:00.00 0.0% init/1
484 485 TOTAL: 25, load averages: 0.05, 0.08, 0.12
485 486
486 487
487 488
488 489 Example 2 Displaying Verbose Process Usage Information
489 490
490 491
491 492 The following command displays verbose process usage information about
492 493 processes with lowest resident set sizes owned by users root and john.
493 494
494 495
495 496 example% prstat -S rss -n 5 -vc -u root,john
496 497
497 498 PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP
498 499 1 root 0.0 0.0 - - - - 100 - 0 0 0 0 init/1
499 500 102 root 0.0 0.0 - - - - 100 - 0 0 3 0 in.rdisc/1
500 501 250 root 0.0 0.0 - - - - 100 - 0 0 0 0 utmpd/1
501 502 1185 john 0.0 0.0 - - - - 100 - 0 0 0 0 csh/1
502 503 240 root 0.0 0.0 - - - - 100 - 0 0 0 0 powerd/4
503 504 TOTAL: 71, load averages: 0.02, 0.04, 0.08
504 505
505 506
506 507
507 508
508 509 EXIT STATUS
509 510 The following exit values are returned:
510 511
511 512 0
512 513
513 514 Successful completion.
514 515
515 516
516 517 1
517 518
518 519 An error occurred.
519 520
520 521
521 522 SEE ALSO
522 523 date(1), lgrpinfo(1), plgrp(1), proc(1), ps(1), time(2), psrinfo(1M),
523 524 psrset(1M), sar(1M), pset_getloadavg(3C), proc(4), project(4),
524 525 attributes(5), resource_controls(5), zones(5)
525 526
526 527 NOTES
527 528 The snapshot of system usage displayed by prstat is true only for a
528 529 split-second, and it may not be accurate by the time it is displayed.
529 530 When the -m option is specified, prstat tries to turn on microstate
530 531 accounting for each process; the original state is restored when prstat
↓ open down ↓ |
170 lines elided |
↑ open up ↑ |
531 532 exits. See proc(4) for additional information about the microstate
532 533 accounting facility.
533 534
534 535
535 536 The total memory size reported in the SWAP and RSS columns for groups
536 537 of processes can sometimes overestimate the actual amount of memory
537 538 used by processes with shared memory segments.
538 539
539 540
540 541
541 - November 14, 2014 PRSTAT(1M)
542 + September 1, 2018 PRSTAT(1M)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX