Vmstat: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 96: Line 96:
===sy===
===sy===


Percentage of total CPU time spent running kernel code (system time).
Percentage of total CPU time spent running kernel code (system time).  Also see [[/proc/stat#system|/proc/stat cpu system time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
Line 104: Line 104:
===ni===
===ni===


Percentages of total CPU time spent running niced user processes.
Percentages of total CPU time spent running niced user processes. Also see [[/proc/stat#nice|/proc/stat cpu nice time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
Line 112: Line 112:
===id===
===id===


Percentages of total CPU time spent idle (in the kernel idle handler).
Percentages of total CPU time spent idle (in the kernel idle handler). Also see [[/proc/stat#idle|/proc/stat cpu idle time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
Line 120: Line 120:
===wa===
===wa===


Percentages of total CPU time spent waiting for IO completion.
Percentages of total CPU time spent waiting for IO completion. Also see [[/proc/stat#iowait|/proc/stat cpu iowait time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
Line 128: Line 128:
===hi===
===hi===


Percentages of total CPU time spent spent servicing hardware interrupts.
Percentages of total CPU time spent spent servicing hardware interrupts. Also see [[/proc/stat#irq|/proc/stat cpu irq time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
Line 136: Line 136:
===si===
===si===


Percentages of total CPU time spent spent servicing software interrupts.
Percentages of total CPU time spent spent servicing software interrupts. Also see [[/proc/stat#softirq|/proc/stat cpu softirq time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
Line 144: Line 144:
===st===
===st===


Percentages of total CPU time stolen from this vm by the hypervisor. For more details see [[Linux Virtualization Concepts#Steal_Time|Virtualization Concepts - Steal Time]].
Percentages of total CPU time stolen from this vm by the hypervisor. Also see [[/proc/stat#steal|/proc/stat cpu steal time]], [[Linux Virtualization Concepts#Steal_Time|Virtualization Concepts - Steal Time]].


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">

Revision as of 09:43, 10 September 2017

External

Internal

Overview

Reports virtual memory and other system statistics.

Output

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 778480    700 156424    0    0   122     4   29   64  0  0 98  0  1

procs

r

The number of runnable processes (running or waiting for run time).

b

The number of processes in uninterruptible sleep. This is the size of the "wait queue" - processes that are waiting for I/O (disk, network, user input, etc.)

memory

swpd

The amount of virtual memory used. Represents how many blocks are swapped out to disk (paged). The same information can be obtained from /proc/swaps. To get the amount of swapped memory, in bytes, multiply the swpd value with the size of the block. This is how you can get the size of the page, in bytes. Is this really true? It contradicts with the data read from /proc/meminfo..

free

The amount of free memory.

buff

The amount of memory used as buffers.

cache

The amount of memory used as cache.

swap

si

Amount of memory swapped in from disk.

so

Amount of memory swapped to disk.

IO

b

Blocks received from a block device (blocks/s).

bo

Blocks sent to a block device (blocks/s).

system

in

The number of interrupts per second, including the clock.

cs

The number of context switches per second.

CPU

Also see:

Linux CPU Information

us

Percentages of total CPU time spent running non-kernel code (user time, not including nice time). Also see /proc/stat cpu user time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuUserTime.java

sy

Percentage of total CPU time spent running kernel code (system time). Also see /proc/stat cpu system time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuKernelTime.java

ni

Percentages of total CPU time spent running niced user processes. Also see /proc/stat cpu nice time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuNiceTime.java

id

Percentages of total CPU time spent idle (in the kernel idle handler). Also see /proc/stat cpu idle time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuIdleTime.java

wa

Percentages of total CPU time spent waiting for IO completion. Also see /proc/stat cpu iowait time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuIoWaitTime.java

hi

Percentages of total CPU time spent spent servicing hardware interrupts. Also see /proc/stat cpu irq time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuHardwareInterruptTime.java

si

Percentages of total CPU time spent spent servicing software interrupts. Also see /proc/stat cpu softirq time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuSoftwareInterruptTime.java

st

Percentages of total CPU time stolen from this vm by the hypervisor. Also see /proc/stat cpu steal time, Virtualization Concepts - Steal Time.

https://github.com/NovaOrdis/os-stats/blob/master/src/main/java/io/novaordis/osstats/metric/cpu/CpuStolenTime.java

Continuous Readings

vmstat 1