392 lines
8.4 KiB
HTML
392 lines
8.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of VMSTAT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>VMSTAT</H1>
|
|
Section: System Administration (8)<BR>Updated: September 2011<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
vmstat - Report virtual memory statistics
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>vmstat</B>
|
|
|
|
[options]
|
|
[<I>delay</I> [<I>count</I>]]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>vmstat</B>
|
|
|
|
reports information about processes, memory, paging, block IO, traps, disks
|
|
and cpu activity.
|
|
<P>
|
|
|
|
The first report produced gives averages since the last reboot. Additional
|
|
reports give information on a sampling period of length
|
|
<I>delay</I>.
|
|
|
|
The process and memory reports are instantaneous in either case.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><I>delay</I>
|
|
|
|
<DD>
|
|
The
|
|
<I>delay</I>
|
|
|
|
between updates in seconds. If no
|
|
<I>delay</I>
|
|
|
|
is specified, only one report is printed with the average values since boot.
|
|
<DT id="2"><I>count</I>
|
|
|
|
<DD>
|
|
Number of updates. In absence of
|
|
<I>count</I>,
|
|
|
|
when
|
|
<I>delay</I>
|
|
|
|
is defined, default is infinite.
|
|
<DT id="3"><B>-a</B>, <B>--active</B><DD>
|
|
Display active and inactive memory, given a 2.5.41 kernel or better.
|
|
<DT id="4"><B>-f</B>, <B>--forks</B><DD>
|
|
The
|
|
<B>-f</B>
|
|
|
|
switch displays the number of forks since boot. This includes the fork,
|
|
vfork, and clone system calls, and is equivalent to the total number of tasks
|
|
created. Each process is represented by one or more tasks, depending on
|
|
thread usage. This display does not repeat.
|
|
<DT id="5"><B>-m</B>, <B>--slabs</B><DD>
|
|
Displays slabinfo.
|
|
<DT id="6"><B>-n</B>, <B>--one-header</B><DD>
|
|
Display the header only once rather than periodically.
|
|
<DT id="7"><B>-s</B>, <B>--stats</B><DD>
|
|
Displays a table of various event counters and memory statistics. This
|
|
display does not repeat.
|
|
<DT id="8"><B>-d</B>, <B>--disk</B><DD>
|
|
Report disk statistics (2.5.70 or above required).
|
|
<DT id="9"><B>-D</B>, <B>--disk-sum</B><DD>
|
|
Report some summary statistics about disk activity.
|
|
<DT id="10"><B>-p</B>, <B>--partition</B> <I>device</I><DD>
|
|
Detailed statistics about partition (2.5.70 or above required).
|
|
<DT id="11"><B>-S</B>, <B>--unit</B> <I>character</I><DD>
|
|
Switches outputs between 1000
|
|
(<I>k</I>),
|
|
|
|
1024
|
|
(<I>K</I>),
|
|
|
|
1000000
|
|
(<I>m</I>),
|
|
|
|
or 1048576
|
|
(<I>M</I>)
|
|
|
|
bytes. Note this does not change the block (bi/bo) fields, which are always
|
|
measured in blocks.
|
|
<DT id="12"><B>-t</B>, <B>--timestamp</B><DD>
|
|
Append timestamp to each line
|
|
<DT id="13"><B>-w</B>, <B>--wide</B><DD>
|
|
Wide output mode (useful for systems with higher amount of memory,
|
|
where the default output mode suffers from unwanted column breakage).
|
|
The output is wider than 80 characters per line.
|
|
<DT id="14"><B>-V</B>, <B>--version</B><DD>
|
|
Display version information and exit.
|
|
<DT id="15"><B>-h</B>, <B>--help</B><DD>
|
|
Display help and exit.
|
|
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>FIELD DESCRIPTION FOR VM MODE</H2>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H3><B>Procs</B>
|
|
|
|
</H3>
|
|
|
|
<PRE>
|
|
r: The number of runnable processes (running or waiting for run time).
|
|
b: The number of processes in uninterruptible sleep.
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H3><B>Memory</B>
|
|
|
|
</H3>
|
|
|
|
These are affected by the --unit option.
|
|
<PRE>
|
|
swpd: the amount of virtual memory used.
|
|
free: the amount of idle memory.
|
|
buff: the amount of memory used as buffers.
|
|
cache: the amount of memory used as cache.
|
|
inact: the amount of inactive memory. (-a option)
|
|
active: the amount of active memory. (-a option)
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H3><B>Swap</B>
|
|
|
|
</H3>
|
|
|
|
These are affected by the --unit option.
|
|
<PRE>
|
|
si: Amount of memory swapped in from disk (/s).
|
|
so: Amount of memory swapped to disk (/s).
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H3><B>IO</B>
|
|
|
|
</H3>
|
|
|
|
<PRE>
|
|
bi: Blocks received from a block device (blocks/s).
|
|
bo: Blocks sent to a block device (blocks/s).
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H3><B>System</B>
|
|
|
|
</H3>
|
|
|
|
<PRE>
|
|
in: The number of interrupts per second, including the clock.
|
|
cs: The number of context switches per second.
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H3><B>CPU</B>
|
|
|
|
</H3>
|
|
|
|
These are percentages of total CPU time.
|
|
<PRE>
|
|
us: Time spent running non-kernel code. (user time, including nice time)
|
|
sy: Time spent running kernel code. (system time)
|
|
id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
|
|
wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle.
|
|
st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAM"> </A>
|
|
<H2>FIELD DESCRIPTION FOR DISK MODE</H2>
|
|
|
|
<A NAME="lbAN"> </A>
|
|
<H3><B>Reads</B>
|
|
|
|
</H3>
|
|
|
|
<PRE>
|
|
total: Total reads completed successfully
|
|
merged: grouped reads (resulting in one I/O)
|
|
sectors: Sectors read successfully
|
|
ms: milliseconds spent reading
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAO"> </A>
|
|
<H3><B>Writes</B>
|
|
|
|
</H3>
|
|
|
|
<PRE>
|
|
total: Total writes completed successfully
|
|
merged: grouped writes (resulting in one I/O)
|
|
sectors: Sectors written successfully
|
|
ms: milliseconds spent writing
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAP"> </A>
|
|
<H3><B>IO</B>
|
|
|
|
</H3>
|
|
|
|
<PRE>
|
|
cur: I/O in progress
|
|
s: seconds spent for I/O
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAQ"> </A>
|
|
<H2>FIELD DESCRIPTION FOR DISK PARTITION MODE</H2>
|
|
|
|
<PRE>
|
|
reads: Total number of reads issued to this partition
|
|
read sectors: Total read sectors for partition
|
|
writes : Total number of writes issued to this partition
|
|
requested writes: Total number of write requests made for partition
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAR"> </A>
|
|
<H2>FIELD DESCRIPTION FOR SLAB MODE</H2>
|
|
|
|
<PRE>
|
|
cache: Cache name
|
|
num: Number of currently active objects
|
|
total: Total number of available objects
|
|
size: Size of each object
|
|
pages: Number of pages with at least one active object
|
|
</PRE>
|
|
|
|
<A NAME="lbAS"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<B>vmstat </B>
|
|
|
|
does not require special permissions.
|
|
<P>
|
|
|
|
These reports are intended to help identify system bottlenecks. Linux
|
|
<B>vmstat</B>
|
|
|
|
does not count itself as a running process.
|
|
<P>
|
|
|
|
All linux blocks are currently 1024 bytes. Old kernels may report blocks as
|
|
512 bytes, 2048 bytes, or 4096 bytes.
|
|
<P>
|
|
|
|
Since procps 3.1.9, vmstat lets you choose units (k, K, m, M). Default is K
|
|
(1024 bytes) in the default mode.
|
|
<P>
|
|
|
|
vmstat uses slabinfo 1.1
|
|
<A NAME="lbAT"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
|
|
|
|
<PRE>
|
|
/proc/meminfo
|
|
/proc/stat
|
|
/proc/*/stat
|
|
</PRE>
|
|
|
|
<A NAME="lbAU"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+free">free</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+iostat">iostat</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+mpstat">mpstat</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ps">ps</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+sar">sar</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+top">top</A></B>(1)
|
|
|
|
<P>
|
|
|
|
<A NAME="lbAV"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
Does not tabulate the block io per device or count the number of system calls.
|
|
<A NAME="lbAW"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
Written by
|
|
|
|
Henry Ware
|
|
|
|
<BR>
|
|
|
|
|
|
Fabian Frédérick
|
|
|
|
(diskstat, slab, partitions...)
|
|
<A NAME="lbAX"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
Please send bug reports to
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="16"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="17"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="18"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="19"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="20"><A HREF="#lbAF">FIELD DESCRIPTION FOR VM MODE</A><DD>
|
|
<DL>
|
|
<DT id="21"><A HREF="#lbAG"><B>Procs</B>
|
|
|
|
</A><DD>
|
|
<DT id="22"><A HREF="#lbAH"><B>Memory</B>
|
|
|
|
</A><DD>
|
|
<DT id="23"><A HREF="#lbAI"><B>Swap</B>
|
|
|
|
</A><DD>
|
|
<DT id="24"><A HREF="#lbAJ"><B>IO</B>
|
|
|
|
</A><DD>
|
|
<DT id="25"><A HREF="#lbAK"><B>System</B>
|
|
|
|
</A><DD>
|
|
<DT id="26"><A HREF="#lbAL"><B>CPU</B>
|
|
|
|
</A><DD>
|
|
</DL>
|
|
<DT id="27"><A HREF="#lbAM">FIELD DESCRIPTION FOR DISK MODE</A><DD>
|
|
<DL>
|
|
<DT id="28"><A HREF="#lbAN"><B>Reads</B>
|
|
|
|
</A><DD>
|
|
<DT id="29"><A HREF="#lbAO"><B>Writes</B>
|
|
|
|
</A><DD>
|
|
<DT id="30"><A HREF="#lbAP"><B>IO</B>
|
|
|
|
</A><DD>
|
|
</DL>
|
|
<DT id="31"><A HREF="#lbAQ">FIELD DESCRIPTION FOR DISK PARTITION MODE</A><DD>
|
|
<DT id="32"><A HREF="#lbAR">FIELD DESCRIPTION FOR SLAB MODE</A><DD>
|
|
<DT id="33"><A HREF="#lbAS">NOTES</A><DD>
|
|
<DT id="34"><A HREF="#lbAT">FILES</A><DD>
|
|
<DT id="35"><A HREF="#lbAU">SEE ALSO</A><DD>
|
|
<DT id="36"><A HREF="#lbAV">BUGS</A><DD>
|
|
<DT id="37"><A HREF="#lbAW">AUTHORS</A><DD>
|
|
<DT id="38"><A HREF="#lbAX">REPORTING BUGS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|