1

I am using vmstat on my linux machine, and it shows

➜  ~ vmstat                                                                                                                                                                                                                        [16:56:44]
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0      0 18290200 1056100 8039540    0    0     1     6    4    7  1  0 99  0  0

when I check man vmstat, it says swpd: the amount of virtual memory used. which doesn't make any sense to me, because how can my virtual memory used is zero? Is the man page of vmstat wrong?

Chanson
  • 11
  • 4

1 Answers1

0

"...amount of virtual memory used"

"used by kswapd" should maybe be added. Here are some good examples from 2014: How to read Vmstat output

When there is "si" or "so", then "swapd" also has a value.

[user@RHEL ~]$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 3  1 244208  10312   1552  62636    4   23    98   249   44  304 28  3 68  1  0
 0  2 244920   6852   1844  67284    0  544  5248   544  236 1655  4  6  0 90  0
 1  2 256556   7468   1892  69356    0 3404  6048  3448  290 2604  5 12  0 83  0
 0  2 263832   8416   1952  71028    0 3788  2792  3788  140 2926 12 14  0 74  0
 0  3 274492   7704   1964  73064    0 4444  2812  5840  295 4201  8 22  0 69  0

I guess "swpd" in vmstat is the same as "swap, used" in free.

vmstat shows "si" and "so" as "per second" values, free only gives a snapshot of overall swap use.