Linux vmstat?????????
???????????? ???????[ 2014/8/27 10:35:09 ] ?????????????? Linux ????
????vmstat???????????Linux/Unix???????????????????????????????????????????????CPU???????????????????潻???????IO??д?????????????????Linux/Unix??????????????Linux/Unix?????????????top????????????????????CPU????棬IO????????????????????????????????CPU??????????????(??ó????????)??
???????vmstat??????????????????????????????????????????????????????????λ???????????????????????????:
????root@ubuntu:~# vmstat 2 1
????procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
????r b swpd free buff cache si so bi bo in cs us sy id wa
????1 0 0 3498472 315836 3819540 0 0 0 1 2 0 0 0 100 0
????2??????????????η?????????1?????????Ρ?
??????????????ù????У??????????????????????????????????vmstat?????????:
root@ubuntu:~# vmstat 2
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 0 0 3499840 315836 3819660 0 0 0 1 2 0 0 0 100 0
0 0 0 3499584 315836 3819660 0 0 0 0 88 158 0 0 100 0
0 0 0 3499708 315836 3819660 0 0 0 2 86 162 0 0 100 0
0 0 0 3499708 315836 3819660 0 0 0 10 81 151 0 0 100 0
1 0 0 3499732 315836 3819660 0 0 0 2 83 154 0 0 100 0
????????vmstat?2????????????????????????????????????5????????????????
??????????????????????????????????????????????
????r ??????ж???(??????????????????CPU)???????????????CPU?????У?????????????????????????CPU??????????CPU????????????top??????й??????????????3???????????5?????????10?????????????????????Σ???top????????????????ж??С???????ж??й?????????CPU?????????????CPU????????
????b ????????????????????????????????????????
????swpd ??????????????С?????????0?????????????????治??????????????????й????????????????????????????????????????????????
????free ???е??????????С??????????????8G?????3415M??
????buff Linux/Unix?????????洢????????????????????????棬???????????300??M
????cache cache?????????????????????????????????壬???????????300??M(??????Linux/Unix??????????????е???????????????????????????????棬???????? ??????е?????????????????????buffer/cached????????á?)
????si ???????????????????С?????????????0???????????治??????????й???????????????????????????????????????????
????so ??????????д???????С?????????????0??????
????bi ???豸?????????????????????豸??????????е????????????豸???????С??1024byte????????????IO??????????????0??????????????????????????(2-3T)???????????????140000/s??????д????????140M???
????bo ???豸????????????????????????????bo?????0??bi??bo???????0???????IO??????????????????
????in ???CPU???ж??????????????ж?
????cs ??????????л??????????????????????????????????????л????????л????????????????л?????????С???????????????????????????????????????apache??nginx????web???????У??????????????????????м?????????????????????????web???????????????????????????????μ?????????cs????????С??????????????????????????????????????????ε???????????????????????????????????????л???????????????????????????????????????????????л??????????????CPU????????????????л???????CPU???????μ?????????CPU??г????????????????
????us ???CPU????????????????????????????????????????????us???100??r???ж??д?80(??????????????????????????)??
????sy ??CPU??????????????????????????????IO?????????
????id ???? CPU???????????id + us + sy = 100??????????id?????CPU??????us?????CPU??????sy????CPU??????
????wt ???IO CPU???
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11