cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

os:linux:command:vmstat.html



Performance

How to use vmstat Command in Linux

$ 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
 0  0    224 495336 219080 2382692    0    0     1    18    0    0  0  0 99  0  0
 0  0    224 495336 219080 2382692    0    0     0     0 1023 3054  0  0 100  0  0
 0  0    224 495336 219080 2382692    0    0     0    32 1031 3074  0  0 100  0  0
 0  0    224 495336 219080 2382692    0    0     0     0 1011 3057  0  0 100  0  0
 0  0    224 494964 219080 2382692    0    0     0     0 1056 3076  0  0 100  0  0
$
$ vmstat 1 86400 | awk '{print strftime("%Y/%m/%d %H:%M:%S"), $0} { system(":") }'
2016/01/07 06:22:20 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
2016/01/07 06:22:20  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
2016/01/07 06:22:20  2  0      0  82040  38108 255436    0    0    28     6 1019   44  0  1 99  0  0
2016/01/07 06:22:21  0  0      0  81776  38108 255436    0    0     0     0 1007   58  0  0 100  0  0
2016/01/07 06:22:22  0  0      0  81776  38108 255436    0    0     0     0 1025   59  0  2 98  0  0
2016/01/07 06:22:23  0  0      0  81776  38108 255436    0    0     0     0 1002   38  0  1 99  0  0
2016/01/07 06:22:24  0  0      0  81776  38108 255436    0    0     0     0 1024   55  1  0 99  0  0
2016/01/07 06:22:25  0  0      0  81776  38116 255436    0    0     0    56  999   46  0  1 99  0  0



os/linux/command/vmstat.html.txt ยท Last modified: 2017/05/14 by admin

Page Tools