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