[BACK]Return to vmstat.8 CVS log [TXT][DIR] Up to [local] / src / usr.bin / vmstat

Annotation of src/usr.bin/vmstat/vmstat.8, Revision 1.30

1.30    ! jmc         1: .\"    $OpenBSD: vmstat.8,v 1.29 2004/01/30 19:32:17 deraadt Exp $
1.3       deraadt     2: .\"    $NetBSD: vmstat.8,v 1.12 1996/05/10 23:19:30 thorpej Exp $
1.1       deraadt     3: .\"
                      4: .\" Copyright (c) 1986, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.27      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"    @(#)vmstat.8    8.1 (Berkeley) 6/6/93
                     32: .\"
1.8       deraadt    33: .Dd June 6, 1993
                     34: .Dt VMSTAT 8
                     35: .Os
                     36: .Sh NAME
                     37: .Nm vmstat
1.24      deraadt    38: .Nd report statistics about kernel activities
1.8       deraadt    39: .Sh SYNOPSIS
                     40: .Nm vmstat
1.23      art        41: .Op Fl fimstv
1.8       deraadt    42: .Nm vmstat
                     43: .Op Fl c Ar count
1.9       janjaap    44: .Op Fl M Ar core
1.8       deraadt    45: .Op Fl N Ar system
                     46: .Op Fl w Ar wait
1.26      jmc        47: .Op Ar disks
1.8       deraadt    48: .Sh DESCRIPTION
1.15      aaron      49: .Nm
1.1       deraadt    50: reports certain kernel statistics kept about process, virtual memory,
1.15      aaron      51: disk, trap and CPU activity.
1.8       deraadt    52: .Pp
1.1       deraadt    53: The options are as follows:
1.17      aaron      54: .Bl -tag -width Ds
1.8       deraadt    55: .It Fl c Ar count
1.1       deraadt    56: Repeat the display
1.8       deraadt    57: .Ar count
1.1       deraadt    58: times.
                     59: The first display is for the time since a reboot and each subsequent report
                     60: is for the time period since the last display.
                     61: If no
1.8       deraadt    62: .Ar wait
1.1       deraadt    63: interval is specified, the default is 1 second.
1.8       deraadt    64: .It Fl f
1.26      jmc        65: Report on the number of
1.8       deraadt    66: .Xr fork 2 ,
1.21      angelos    67: .Xr rfork 2
1.26      jmc        68: and
                     69: .Xr vfork 2
1.16      niklas     70: system calls as well as kernel thread creations since system startup,
                     71: and the number of pages of virtual memory involved in each.
1.8       deraadt    72: .It Fl i
1.1       deraadt    73: Report on the number of interrupts taken by each device since system
                     74: startup.
1.8       deraadt    75: .It Fl M Ar core
1.13      aaron      76: Extract values associated with the name list from the specified core
1.22      miod       77: instead of the running kernel.
1.8       deraadt    78: .It Fl N Ar system
1.22      miod       79: Extract the name list from the specified system instead of the running kernel.
1.8       deraadt    80: .It Fl m
1.1       deraadt    81: Report on the usage of kernel dynamic memory listed first by size of
                     82: allocation and then by type of usage.
1.8       deraadt    83: .It Fl s
1.1       deraadt    84: Display the contents of the
1.8       deraadt    85: .Ar sum
1.1       deraadt    86: structure, giving the total number of several kinds of paging related
                     87: events which have occurred since system startup.
1.8       deraadt    88: .It Fl t
1.1       deraadt    89: Report on the number of page in and page reclaims since system startup,
                     90: and the amount of time required by each.
1.8       deraadt    91: .It Fl w Ar wait
1.1       deraadt    92: Pause
1.8       deraadt    93: .Ar wait
1.1       deraadt    94: seconds between each display.
                     95: If no repeat
1.8       deraadt    96: .Ar count
1.1       deraadt    97: is specified, the default is infinity.
1.23      art        98: .It Fl v
                     99: Print more verbose information.
1.8       deraadt   100: .El
                    101: .Pp
1.1       deraadt   102: By default,
1.15      aaron     103: .Nm
1.8       deraadt   104: displays the following information just once:
                    105: .Bl -tag -width "whatever"
1.26      jmc       106: .It Ar procs
1.1       deraadt   107: Information about the numbers of processes in various states.
1.8       deraadt   108: .Pp
                    109: .Bl -inset -width xxxxxx -compact
                    110: .It Ar r
                    111: in run queue
                    112: .It Ar b
                    113: blocked for resources (i/o, paging, etc.)
                    114: .It Ar w
                    115: runnable or short sleeper (< 20 secs) but swapped
                    116: .El
                    117: .Pp
                    118: .It Ar memory
1.15      aaron     119: Information about the usage of virtual and real memory.
                    120: Virtual pages
1.8       deraadt   121: (reported in units of 1024 bytes) are considered active if they belong
                    122: to processes which are running or have run in the last 20 seconds.
                    123: .Pp
                    124: .Bl -inset -width xxxxxx -compact
                    125: .It Ar avm
                    126: active virtual pages
                    127: .It Ar fre
                    128: size of the free list
                    129: .El
                    130: .Pp
                    131: .It Ar page
1.1       deraadt   132: Information about page faults and paging activity.
                    133: These are averaged each five seconds, and given in units per second.
1.8       deraadt   134: .Pp
1.28      tedu      135: .Bl -tag -width flt -compact
                    136: .It Ar flt
                    137: page faults
1.8       deraadt   138: .It Ar re
                    139: page reclaims (simulating reference bits)
                    140: .It Ar at
                    141: pages attached (found in free list)
                    142: .It Ar pi
                    143: pages paged in
                    144: .It Ar po
                    145: pages paged out
                    146: .It Ar fr
1.28      tedu      147: pages freed
1.8       deraadt   148: .It Ar sr
1.28      tedu      149: pages scanned by clock algorithm
1.8       deraadt   150: .El
                    151: .Pp
                    152: .It Ar disks
1.2       tholo     153: Disk transfers per second.
1.1       deraadt   154: Typically paging will be split across the available drives.
                    155: The header of the field is the first character of the disk name and
                    156: the unit number.
1.29      deraadt   157: If more than two disk drives are configured in the system,
1.15      aaron     158: .Nm
1.29      deraadt   159: displays only the first two drives.
1.1       deraadt   160: To force
1.15      aaron     161: .Nm
1.1       deraadt   162: to display specific drives, their names may be supplied on the command line.
1.8       deraadt   163: .Pp
1.28      tedu      164: .It Ar traps
1.1       deraadt   165: Trap/interrupt rate averages per second over last 5 seconds.
1.8       deraadt   166: .Pp
                    167: .Bl -inset -width xxxxxx -compact
1.28      tedu      168: .It Ar int
1.8       deraadt   169: device interrupts per interval (including clock interrupts)
1.28      tedu      170: .It Ar sys
1.8       deraadt   171: system calls per interval
                    172: .It Ar cs
1.28      tedu      173: \ \&CPU context switch rate (switches/interval)
1.8       deraadt   174: .El
                    175: .Pp
                    176: .It Ar cpu
1.1       deraadt   177: Breakdown of percentage usage of CPU time.
1.8       deraadt   178: .Pp
                    179: .Bl -inset -width xxxxxx -compact
                    180: .It Ar us
                    181: user time for normal and low priority processes
                    182: .It Ar sy
                    183: system time
                    184: .It Ar id
1.15      aaron     185: CPU idle
1.8       deraadt   186: .El
                    187: .El
                    188: .Sh EXAMPLES
1.15      aaron     189: The command
                    190: .Ic vmstat -w 5
                    191: will print what the system is doing every five
1.1       deraadt   192: seconds; this is a good choice of printing interval since this is how often
                    193: some of the statistics are sampled in the system.
                    194: Others vary every second and running the output for a while will make it
                    195: apparent which are recomputed every second.
1.8       deraadt   196: .Sh SEE ALSO
                    197: .Xr fstat 1 ,
                    198: .Xr netstat 1 ,
                    199: .Xr nfsstat 1 ,
1.30    ! jmc       200: .Xr procmap 1 ,
1.8       deraadt   201: .Xr ps 1 ,
                    202: .Xr systat 1 ,
                    203: .Xr iostat 8 ,
                    204: .Xr pstat 8
1.14      aaron     205: .Pp
1.15      aaron     206: The sections starting with
                    207: .Dq Interpreting system activity
                    208: in
1.10      pjanzen   209: .%T "Installing and Operating 4.3BSD" .
1.8       deraadt   210: .Sh BUGS
                    211: The
                    212: .Fl c
                    213: and
                    214: .Fl w
                    215: options are only available with the default output.
                    216: .Pp
                    217: This manual page lacks an incredible amount of detail.