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

1.38    ! mpi         1: .\"    $OpenBSD: vmstat.8,v 1.37 2016/03/30 06:58:06 jmc 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.38    ! mpi        33: .Dd $Mdocdate: March 30 2016 $
1.8       deraadt    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.31      aaron      41: .Op Fl fimstvz
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.33      jaredy     47: .Op Ar disk ...
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.33      jaredy     51: disk, trap, and CPU activity.
                     52: The default behavior is to print a one-line summary of these statistics.
                     53: The
                     54: .Fl c
                     55: and
                     56: .Fl w
                     57: flags may be used to continually report summaries.
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.26      jmc        71: Report on the number of
1.8       deraadt    72: .Xr fork 2 ,
1.37      jmc        73: .Xr __tfork 3 ,
1.26      jmc        74: and
                     75: .Xr vfork 2
1.16      niklas     76: system calls as well as kernel thread creations since system startup,
                     77: and the number of pages of virtual memory involved in each.
1.8       deraadt    78: .It Fl i
1.1       deraadt    79: Report on the number of interrupts taken by each device since system
                     80: startup.
1.8       deraadt    81: .It Fl M Ar core
1.13      aaron      82: Extract values associated with the name list from the specified core
1.22      miod       83: instead of the running kernel.
1.8       deraadt    84: .It Fl m
1.1       deraadt    85: Report on the usage of kernel dynamic memory listed first by size of
                     86: allocation and then by type of usage.
1.32      jmc        87: .It Fl N Ar system
                     88: Extract the name list from the specified system instead of the running kernel.
1.8       deraadt    89: .It Fl s
1.1       deraadt    90: Display the contents of the
1.33      jaredy     91: .Va uvmexp
                     92: structure (see
                     93: .Xr uvm 9 ) ,
                     94: giving the total number of several kinds of paging related
1.1       deraadt    95: events which have occurred since system startup.
1.8       deraadt    96: .It Fl t
1.1       deraadt    97: Report on the number of page in and page reclaims since system startup,
                     98: and the amount of time required by each.
1.32      jmc        99: .It Fl v
                    100: Print more verbose information.
1.8       deraadt   101: .It Fl w Ar wait
1.1       deraadt   102: Pause
1.8       deraadt   103: .Ar wait
1.1       deraadt   104: seconds between each display.
                    105: If no repeat
1.8       deraadt   106: .Ar count
1.1       deraadt   107: is specified, the default is infinity.
1.31      aaron     108: .It Fl z
                    109: When used with
                    110: .Fl i ,
                    111: also list devices which have not yet generated an interrupt.
1.8       deraadt   112: .El
                    113: .Pp
1.1       deraadt   114: By default,
1.15      aaron     115: .Nm
1.8       deraadt   116: displays the following information just once:
1.33      jaredy    117: .Bl -tag -width Ds
                    118: .It Li procs
1.1       deraadt   119: Information about the numbers of processes in various states.
1.8       deraadt   120: .Pp
1.33      jaredy    121: .Bl -tag -width 4n -compact
                    122: .It Li r
1.8       deraadt   123: in run queue
1.38    ! mpi       124: .It Li s
        !           125: sleeping
1.8       deraadt   126: .El
1.33      jaredy    127: .It Li memory
1.15      aaron     128: Information about the usage of virtual and real memory.
1.8       deraadt   129: .Pp
1.33      jaredy    130: .Bl -tag -width 4n -compact
                    131: .It Li avm
1.8       deraadt   132: active virtual pages
1.33      jaredy    133: .It Li fre
1.8       deraadt   134: size of the free list
                    135: .El
1.33      jaredy    136: .It Li 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
1.33      jaredy    140: .Bl -tag -width 4n -compact
                    141: .It Li flt
1.28      tedu      142: page faults
1.33      jaredy    143: .It Li re
1.8       deraadt   144: page reclaims (simulating reference bits)
1.33      jaredy    145: .It Li at
1.8       deraadt   146: pages attached (found in free list)
1.33      jaredy    147: .It Li pi
1.8       deraadt   148: pages paged in
1.33      jaredy    149: .It Li po
1.8       deraadt   150: pages paged out
1.33      jaredy    151: .It Li fr
1.28      tedu      152: pages freed
1.33      jaredy    153: .It Li sr
1.28      tedu      154: pages scanned by clock algorithm
1.8       deraadt   155: .El
1.33      jaredy    156: .It Li disks
1.2       tholo     157: Disk transfers per second.
1.1       deraadt   158: Typically paging will be split across the available drives.
                    159: The header of the field is the first character of the disk name and
                    160: the unit number.
1.29      deraadt   161: If more than two disk drives are configured in the system,
1.15      aaron     162: .Nm
1.29      deraadt   163: displays only the first two drives.
1.1       deraadt   164: To force
1.15      aaron     165: .Nm
1.1       deraadt   166: to display specific drives, their names may be supplied on the command line.
1.33      jaredy    167: .It Li traps
1.1       deraadt   168: Trap/interrupt rate averages per second over last 5 seconds.
1.8       deraadt   169: .Pp
1.33      jaredy    170: .Bl -tag -width 4n -compact
                    171: .It Li int
1.8       deraadt   172: device interrupts per interval (including clock interrupts)
1.33      jaredy    173: .It Li sys
1.8       deraadt   174: system calls per interval
1.33      jaredy    175: .It Li cs
                    176: CPU context switch rate (switches/interval)
1.8       deraadt   177: .El
1.33      jaredy    178: .It Li cpu
1.1       deraadt   179: Breakdown of percentage usage of CPU time.
1.8       deraadt   180: .Pp
1.33      jaredy    181: .Bl -tag -width 4n -compact
                    182: .It Li us
1.8       deraadt   183: user time for normal and low priority processes
1.33      jaredy    184: .It Li sy
1.8       deraadt   185: system time
1.33      jaredy    186: .It Li id
1.15      aaron     187: CPU idle
1.8       deraadt   188: .El
                    189: .El
1.33      jaredy    190: .Sh FILES
                    191: .Bl -tag -width Pa -compact
                    192: .It Pa /bsd
                    193: default kernel image
                    194: .It Pa /dev/kmem
                    195: default memory file
                    196: .El
1.8       deraadt   197: .Sh EXAMPLES
1.15      aaron     198: The command
                    199: .Ic vmstat -w 5
                    200: will print what the system is doing every five
1.1       deraadt   201: seconds; this is a good choice of printing interval since this is how often
                    202: some of the statistics are sampled in the system.
                    203: Others vary every second and running the output for a while will make it
                    204: apparent which are recomputed every second.
1.8       deraadt   205: .Sh SEE ALSO
                    206: .Xr fstat 1 ,
                    207: .Xr netstat 1 ,
                    208: .Xr nfsstat 1 ,
1.30      jmc       209: .Xr procmap 1 ,
1.8       deraadt   210: .Xr ps 1 ,
                    211: .Xr systat 1 ,
1.34      jmc       212: .Xr top 1 ,
1.8       deraadt   213: .Xr iostat 8 ,
1.33      jaredy    214: .Xr pstat 8 ,
                    215: .Xr uvm 9
1.8       deraadt   216: .Sh BUGS
                    217: The
                    218: .Fl c
                    219: and
                    220: .Fl w
                    221: options are only available with the default output.
                    222: .Pp
                    223: This manual page lacks an incredible amount of detail.