1 '\" te 2 .\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved. 3 .\" 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. 4 .\" 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 5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 6 .TH VMSTAT 1M "Mar 23, 2009" 7 .SH NAME 8 vmstat \- report virtual memory statistics 9 .SH SYNOPSIS 10 .LP 11 .nf 12 \fBvmstat\fR [\fB-cipqsS\fR] [\fB-T\fR u | d] [\fIdisks\fR] [\fIinterval\fR [\fIcount\fR]] 13 .fi 14 15 .SH DESCRIPTION 16 .sp 17 .LP 18 \fBvmstat\fR reports virtual memory statistics regarding kernel thread, virtual 19 memory, disk, trap, and \fBCPU\fR activity. 20 .sp 21 .LP 22 On \fBMP\fR (multi-processor) systems, \fBvmstat\fR averages the number of 23 \fBCPUs\fR into the output. For per-processor statistics, see \fBmpstat\fR(1M). 24 .sp 25 .LP 26 \fBvmstat\fR only supports statistics for certain devices. For more general 27 system statistics, use \fBsar\fR(1), \fBiostat\fR(1M), or \fBsar\fR(1M). 28 .sp 29 .LP 30 Without options, \fBvmstat\fR displays a one-line summary of the virtual memory 31 activity since the system was booted. 32 .sp 33 .LP 34 During execution of the kernel status command, the \fBstate\fR of the system 35 can change. If relevant, a state change message is included in the \fBvmstat\fR 36 output, in one of the following forms: 37 .sp 38 .in +2 39 .nf 40 <<device added: sd0>> 41 <<device removed: sd0>> 42 <<processors added: 1, 3>> 43 <<processors removed: 1, 3>> 44 .fi 45 .in -2 46 .sp 47 48 .sp 49 .LP 50 See \fI\fR for device naming conventions for disks. 51 .SH OPTIONS 52 .sp 53 .LP 54 The following options are supported: 55 .sp 56 .ne 2 57 .na 58 \fB\fB-c\fR\fR 59 .ad 60 .RS 13n 61 Report cache flushing statistics. This option is obsolete, and no longer 62 meaningful. This option might be removed in a future version of Solaris. 63 .RE 64 65 .sp 66 .ne 2 67 .na 68 \fB\fB-i\fR\fR 69 .ad 70 .RS 13n 71 Report the number of interrupts per device. \fIcount\fR and \fIinterval\fR does 72 not apply to the \fB-i\fR option. 73 .RE 74 75 .sp 76 .ne 2 77 .na 78 \fB\fB-p\fR\fR 79 .ad 80 .RS 13n 81 Report paging activity in details. This option will display the following, 82 respectively: 83 .sp 84 .ne 2 85 .na 86 \fBepi\fR 87 .ad 88 .RS 7n 89 Executable page-ins. 90 .RE 91 92 .sp 93 .ne 2 94 .na 95 \fBepo\fR 96 .ad 97 .RS 7n 98 Executable page-outs. 99 .RE 100 101 .sp 102 .ne 2 103 .na 104 \fBepf\fR 105 .ad 106 .RS 7n 107 Executable page-frees. 108 .RE 109 110 .sp 111 .ne 2 112 .na 113 \fBapi\fR 114 .ad 115 .RS 7n 116 Anonymous page-ins. 117 .RE 118 119 .sp 120 .ne 2 121 .na 122 \fBapo\fR 123 .ad 124 .RS 7n 125 Anonymous page-outs. 126 .RE 127 128 .sp 129 .ne 2 130 .na 131 \fBapf\fR 132 .ad 133 .RS 7n 134 Anonymous page-frees. 135 .RE 136 137 .sp 138 .ne 2 139 .na 140 \fBfpi\fR 141 .ad 142 .RS 7n 143 File system page-ins. 144 .RE 145 146 .sp 147 .ne 2 148 .na 149 \fBfpo\fR 150 .ad 151 .RS 7n 152 File system page-outs. 153 .RE 154 155 .sp 156 .ne 2 157 .na 158 \fBfpf\fR 159 .ad 160 .RS 7n 161 File system page-frees. 162 .RE 163 164 When executed in a \fBzone\fR and if the pools facility is active, all of the 165 above only report actitivity on the processors in the processor set of the 166 \fBzone\fR's pool. 167 .RE 168 169 .sp 170 .ne 2 171 .na 172 \fB\fB-q\fR\fR 173 .ad 174 .RS 13n 175 Suppress messages related to state changes. 176 .RE 177 178 .sp 179 .ne 2 180 .na 181 \fB\fB-s\fR\fR 182 .ad 183 .RS 13n 184 Display the total number of various system events since boot. \fIcount\fR and 185 \fIinterval\fR does not apply to the \fB-s\fR option. 186 .RE 187 188 .sp 189 .ne 2 190 .na 191 \fB\fB-S\fR\fR 192 .ad 193 .RS 13n 194 Report on swapping rather than paging activity. This option will change two 195 fields in \fBvmstat\fR's ``paging'' display: rather than the ``re'' and ``mf'' 196 fields, \fBvmstat\fR will report ``si'' (swap-ins) and ``so'' (swap-outs). 197 .RE 198 199 .sp 200 .ne 2 201 .na 202 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR 203 .ad 204 .RS 13n 205 Specify \fBu\fR for a printed representation of the internal representation of 206 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See 207 \fBdate\fR(1). 208 .RE 209 210 .SH OPERANDS 211 .sp 212 .LP 213 The following operands are supported: 214 .sp 215 .ne 2 216 .na 217 \fB\fIcount\fR\fR 218 .ad 219 .RS 12n 220 Specifies the number of times that the statistics are repeated. \fIcount\fR 221 does not apply to the \fB-i\fR and \fB-s\fR options. 222 .RE 223 224 .sp 225 .ne 2 226 .na 227 \fB\fIdisks\fR\fR 228 .ad 229 .RS 12n 230 Specifies which disks are to be given priority in the output (only four disks 231 fit on a line). Common disk names are \fBid\fR, \fBsd\fR, \fBxd\fR, or 232 \fBxy,\fR followed by a number (for example, \fBsd2\fR, \fBxd0\fR, and so 233 forth). 234 .RE 235 236 .sp 237 .ne 2 238 .na 239 \fB\fIinterval\fR\fR 240 .ad 241 .RS 12n 242 Specifies the last number of seconds over which \fBvmstat\fR summarizes 243 activity. This number of seconds repeats forever. \fIinterval\fR does not apply 244 to the \fB-i\fR and \fB-s\fR options. 245 .RE 246 247 .SH EXAMPLES 248 .LP 249 \fBExample 1 \fRUsing \fBvmstat\fR 250 .sp 251 .LP 252 The following command displays a summary of what the system is doing every five 253 seconds. 254 255 .sp 256 .in +2 257 .nf 258 example% \fBvmstat 5\fR 259 260 261 kthr memory page disk faults cpu 262 r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id 263 0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82 264 0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62 265 0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64 266 0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78 267 1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79 268 1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62 269 1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67 270 1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39 271 ^C 272 273 example% 274 .fi 275 .in -2 276 .sp 277 278 .sp 279 .LP 280 The fields of \fBvmstat\fR's display are 281 282 .sp 283 .ne 2 284 .na 285 \fB\fBkthr\fR\fR 286 .ad 287 .RS 10n 288 Report the number of kernel threads in each of the three following states: 289 .sp 290 .ne 2 291 .na 292 \fB\fBr\fR\fR 293 .ad 294 .RS 5n 295 the number of kernel threads in run queue 296 .RE 297 298 .sp 299 .ne 2 300 .na 301 \fB\fBb\fR\fR 302 .ad 303 .RS 5n 304 the number of blocked kernel threads that are waiting for resources \fBI/O,\fR 305 paging, and so forth 306 .RE 307 308 .sp 309 .ne 2 310 .na 311 \fB\fBw\fR\fR 312 .ad 313 .RS 5n 314 the number of swapped out lightweight processes (LWPs) that are waiting for 315 processing resources to finish. 316 .RE 317 318 .RE 319 320 .sp 321 .ne 2 322 .na 323 \fB\fBmemory\fR\fR 324 .ad 325 .RS 10n 326 Report on usage of virtual and real memory. 327 .sp 328 .ne 2 329 .na 330 \fB\fBswap\fR\fR 331 .ad 332 .RS 8n 333 available swap space (Kbytes) 334 .RE 335 336 .sp 337 .ne 2 338 .na 339 \fB\fBfree\fR\fR 340 .ad 341 .RS 8n 342 size of the free list (Kbytes) 343 .RE 344 345 .RE 346 347 .sp 348 .ne 2 349 .na 350 \fB\fBpage\fR\fR 351 .ad 352 .RS 10n 353 Report information about page faults and paging activity. The information on 354 each of the following activities is given in units per second. 355 .sp 356 .ne 2 357 .na 358 \fB\fBre\fR\fR 359 .ad 360 .RS 6n 361 page reclaims \(em but see the \fB-S\fR option for how this field is modified. 362 .RE 363 364 .sp 365 .ne 2 366 .na 367 \fB\fBmf\fR\fR 368 .ad 369 .RS 6n 370 minor faults \(em but see the \fB-S\fR option for how this field is modified. 371 .RE 372 373 .sp 374 .ne 2 375 .na 376 \fB\fBpi\fR\fR 377 .ad 378 .RS 6n 379 kilobytes paged in 380 .RE 381 382 .sp 383 .ne 2 384 .na 385 \fB\fBpo\fR\fR 386 .ad 387 .RS 6n 388 kilobytes paged out 389 .RE 390 391 .sp 392 .ne 2 393 .na 394 \fB\fBfr\fR\fR 395 .ad 396 .RS 6n 397 kilobytes freed 398 .RE 399 400 .sp 401 .ne 2 402 .na 403 \fB\fBde\fR\fR 404 .ad 405 .RS 6n 406 anticipated short-term memory shortfall (Kbytes) 407 .RE 408 409 .sp 410 .ne 2 411 .na 412 \fB\fBsr\fR\fR 413 .ad 414 .RS 6n 415 pages scanned by clock algorithm 416 .RE 417 418 When executed in a \fBzone\fR and if the pools facility is active, all of the 419 above (except for "de") only report activity on the processors in the processor 420 set of the \fBzone\fR's pool. 421 .RE 422 423 .sp 424 .ne 2 425 .na 426 \fB\fBdisk\fR\fR 427 .ad 428 .RS 10n 429 Report the number of disk operations per second. There are slots for up to four 430 disks, labeled with a single letter and number. The letter indicates the type 431 of disk (s = \fBSCSI\fR, i = \fBIPI\fR, and so forth); the number is the 432 logical unit number. 433 .RE 434 435 .sp 436 .ne 2 437 .na 438 \fB\fBfaults\fR\fR 439 .ad 440 .RS 10n 441 Report the trap/interrupt rates (per second). 442 .sp 443 .ne 2 444 .na 445 \fB\fBin\fR\fR 446 .ad 447 .RS 6n 448 interrupts 449 .RE 450 451 .sp 452 .ne 2 453 .na 454 \fB\fBsy\fR\fR 455 .ad 456 .RS 6n 457 system calls 458 .RE 459 460 .sp 461 .ne 2 462 .na 463 \fB\fBcs\fR\fR 464 .ad 465 .RS 6n 466 \fBCPU\fR context switches 467 .RE 468 469 When executed in a \fBzone\fR and if the pools facility is active, all of the 470 above only report actitivity on the processors in the processor set of the 471 \fBzone\fR's pool. 472 .RE 473 474 .sp 475 .ne 2 476 .na 477 \fB\fBcpu\fR\fR 478 .ad 479 .RS 10n 480 Give a breakdown of percentage usage of \fBCPU\fR time. On \fBMP\fR systems, 481 this is an average across all processors. 482 .sp 483 .ne 2 484 .na 485 \fB\fBus\fR\fR 486 .ad 487 .RS 6n 488 user time 489 .RE 490 491 .sp 492 .ne 2 493 .na 494 \fB\fBsy\fR\fR 495 .ad 496 .RS 6n 497 system time 498 .RE 499 500 .sp 501 .ne 2 502 .na 503 \fB\fBid\fR\fR 504 .ad 505 .RS 6n 506 idle time 507 .RE 508 509 When executed in a \fBzone\fR and if the pools facility is active, all of the 510 above only report actitivity on the processors in the processor set of the 511 \fBzone\fR's pool. 512 .RE 513 514 .SH ATTRIBUTES 515 .sp 516 .LP 517 See \fBattributes\fR(5) for descriptions of the following attributes: 518 .sp 519 520 .sp 521 .TS 522 box; 523 c | c 524 l | l . 525 ATTRIBUTE TYPE ATTRIBUTE VALUE 526 _ 527 Interface Stability See below. 528 .TE 529 530 .sp 531 .LP 532 Invocation is evolving. Human readable output is unstable. 533 .SH SEE ALSO 534 .sp 535 .LP 536 \fBdate\fR(1), \fBsar\fR(1), \fBiostat\fR(1M), \fBmpstat\fR(1M), \fBsar\fR(1M), 537 \fBtime\fR(2), \fBattributes\fR(5) 538 .SH NOTES 539 .sp 540 .LP 541 The sum of CPU utilization might vary slightly from 100 because of rounding 542 errors in the production of a percentage figure. 543 .sp 544 .LP 545 The \fB-c\fR option (Report cache flushing statistics) is not supported in this 546 release.