[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.19

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