{"id":126587,"date":"2018-11-15T08:34:41","date_gmt":"2018-11-15T00:34:41","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=126587"},"modified":"2018-11-08T09:36:09","modified_gmt":"2018-11-08T01:36:09","slug":"linux-vmstat-do","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-vmstat-do.html","title":{"rendered":"Linux vmstat\u547d\u4ee4\u5b9e\u9645\u64cd\u4f5c\u4ecb\u7ecd"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nvmstat\u662fVirtual Meomory Statistics\uff08\u865a\u62df\u5185\u5b58\u7edf\u8ba1\uff09\u7684\u7f29\u5199\uff0c\u53ef\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u7684\u865a\u62df\u5185\u5b58\u3001\u8fdb\u7a0b\u3001CPU\u6d3b\u52a8\u8fdb\u884c\u76d1\u63a7\u3002\u5b83\u80fd\u591f\u5bf9\u7cfb\u7edf\u7684\u6574\u4f53\u60c5\u51b5\u8fdb\u884c\u7edf\u8ba1\uff0c\u65e0\u6cd5\u5bf9\u67d0\u4e2a\u8fdb\u7a0b\u8fdb\u884c\u6df1\u5165\u5206\u6790\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

vmstat \u5de5\u5177\u63d0\u4f9b\u4e86\u4e00\u79cd\u4f4e\u5f00\u9500\u7684\u7cfb\u7edf\u6027\u80fd\u89c2\u5bdf\u65b9\u5f0f\u3002
\n(1)\u7528\u6cd5
\n\u7528\u6cd5:\u00a0 vmstat\u00a0 [\u9009\u9879\u53c2\u6570]
\n\u6216\u00a0 vmstat\u00a0 [\u9009\u9879\u53c2\u6570]\u00a0 [\u6570\u5b57]\u00a0 [\u6570\u5b57]
\n(2)\u529f\u80fd:
\n\u529f\u80fd:\u00a0 \u62a5\u544a\u865a\u62df\u5185\u5b58\u7684\u7edf\u8ba1\u4fe1\u606f,\u5173\u4e8e\u8fdb\u7a0b\u3001\u5185\u5b58\u3001I\/O\u7b49\u7cfb\u7edf\u6574\u4f53\u8fd0\u884c\u72b6\u6001\u3002
\n(3)\u9009\u9879\u53c2\u6570:
\n1) -d:\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u663e\u793a\u78c1\u76d8\u76f8\u5173\u7edf\u8ba1\u4fe1\u606f\u3002
\n2) -a\uff1a\u3000\u3000\u3000\u3000\u3000\u3000\u00a0 \u00a0 \u663e\u793a\u6d3b\u8dc3\u548c\u975e\u6d3b\u8dc3\u5185\u5b58
\n3) -f\uff1a\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u00a0 \u663e\u793a\u4ece\u7cfb\u7edf\u542f\u52a8\u81f3\u4eca\u7684fork\u6570\u91cf\u3002
\n4) -p\uff1a\u3000\u3000\u3000\u3000\u3000\u3000\u00a0 \u00a0 \u663e\u793a\u6307\u5b9a\u78c1\u76d8\u5206\u533a\u7edf\u8ba1\u4fe1\u606f
\n5) -s\uff1a\u3000\u3000\u3000\u3000\u3000\u3000\u00a0 \u00a0 \u663e\u793a\u5185\u5b58\u76f8\u5173\u7edf\u8ba1\u4fe1\u606f\u53ca\u591a\u79cd\u7cfb\u7edf\u6d3b\u52a8\u6570\u91cf\u3002
\n6) -m\uff1a\u3000\u3000\u3000\u3000\u3000\u3000\u00a0 \u663e\u793aslabinfo
\n(4)\u5b9e\u4f8b:<\/p>\n

1) \u3001vmstat\u663e\u793a\u865a\u62df\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/strong><\/div>\n
linuxidc@linuxidc:~$ vmstat\r\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\r\nr\u00a0 b \u4ea4\u6362 \u7a7a\u95f2 \u7f13\u51b2 \u7f13\u5b58\u00a0 si\u00a0 so\u00a0 \u00a0 bi\u00a0 \u00a0 bo\u00a0 in\u00a0 cs us sy id wa st\r\n4\u00a0 0\u00a0 \u00a0 \u00a0 0 156252\u00a0 61016 871752\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 76\u00a0 \u00a0 29\u00a0 53\u00a0 138\u00a0 1\u00a0 1 98\u00a0 0\u00a0 0\r\n<\/pre>\n

\"\"<\/p>\n

\u5b57\u6bb5\u8bf4\u660e:<\/p>\n

1.Procs\uff08\u8fdb\u7a0b\uff09<\/strong><\/span><\/div>\n

r: \u8fd0\u884c\u961f\u5217\u4e2d\u8fdb\u7a0b\u6570\u91cf\uff0c\u8fd9\u4e2a\u503c\u4e5f\u53ef\u4ee5\u5224\u65ad\u662f\u5426\u9700\u8981\u589e\u52a0CPU\u3002\uff08\u957f\u671f\u5927\u4e8e1\uff09<\/p>\n

b: \u7b49\u5f85IO\u7684\u8fdb\u7a0b\u6570\u91cf\u3002<\/p>\n

2.Memory\uff08\u5185\u5b58\uff09<\/strong><\/span><\/div>\n

swpd: \u4f7f\u7528\u865a\u62df\u5185\u5b58\u5927\u5c0f\uff0c\u5982\u679cswpd\u7684\u503c\u4e0d\u4e3a0\uff0c\u4f46\u662fSI\uff0cSO\u7684\u503c\u957f\u671f\u4e3a0\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0d\u4f1a\u5f71\u54cd\u7cfb\u7edf\u6027\u80fd\u3002<\/p>\n

free: \u7a7a\u95f2\u7269\u7406\u5185\u5b58\u5927\u5c0f\u3002<\/p>\n

buff: \u7528\u4f5c\u7f13\u51b2\u7684\u5185\u5b58\u5927\u5c0f\u3002<\/p>\n

cache: \u7528\u4f5c\u7f13\u5b58\u7684\u5185\u5b58\u5927\u5c0f\uff0c\u5982\u679ccache\u7684\u503c\u5927\u7684\u65f6\u5019\uff0c\u8bf4\u660ecache\u5904\u7684\u6587\u4ef6\u6570\u591a\uff0c\u5982\u679c\u9891\u7e41\u8bbf\u95ee\u5230\u7684\u6587\u4ef6\u90fd\u80fd\u88abcache\u5904\uff0c\u90a3\u4e48\u78c1\u76d8\u7684\u8bfbIO bi\u4f1a\u975e\u5e38\u5c0f\u3002<\/p>\n

3.Swap<\/strong><\/span><\/div>\n

si: \u6bcf\u79d2\u4ece\u4ea4\u6362\u533a\u5199\u5230\u5185\u5b58\u7684\u5927\u5c0f\uff0c\u7531\u78c1\u76d8\u8c03\u5165\u5185\u5b58\u3002<\/p>\n

so: \u6bcf\u79d2\u5199\u5165\u4ea4\u6362\u533a\u7684\u5185\u5b58\u5927\u5c0f\uff0c\u7531\u5185\u5b58\u8c03\u5165\u78c1\u76d8\u3002<\/p>\n

\u6ce8\u610f:<\/p>\n

\u5185\u5b58\u591f\u7528\u7684\u65f6\u5019\uff0c\u8fd92\u4e2a\u503c\u90fd\u662f0\uff0c\u5982\u679c\u8fd92\u4e2a\u503c\u957f\u671f\u5927\u4e8e0\u65f6\uff0c\u7cfb\u7edf\u6027\u80fd\u4f1a\u53d7\u5230\u5f71\u54cd\uff0c\u78c1\u76d8IO\u548cCPU\u8d44\u6e90\u90fd\u4f1a\u88ab\u6d88\u8017\u3002\u6709\u4e9b\u670b\u53cb\u770b\u5230\u7a7a\u95f2\u5185\u5b58\uff08free\uff09\u5f88\u5c11\u7684\u6216\u63a5\u8fd1\u4e8e0\u65f6\uff0c\u5c31\u8ba4\u4e3a\u5185\u5b58\u4e0d\u591f\u7528\u4e86\uff0c\u4e0d\u80fd\u5149\u770b\u8fd9\u4e00\u70b9\uff0c\u8fd8\u8981\u7ed3\u5408si\u548cso\uff0c\u5982\u679cfree\u5f88\u5c11\uff0c\u4f46\u662fsi\u548cso\u4e5f\u5f88\u5c11\uff08\u5927\u591a\u65f6\u5019\u662f0\uff09\uff0c\u90a3\u4e48\u4e0d\u7528\u62c5\u5fc3\uff0c\u7cfb\u7edf\u6027\u80fd\u8fd9\u65f6\u4e0d\u4f1a\u53d7\u5230\u5f71\u54cd\u7684\u3002<\/p>\n

4.IO\uff08\u73b0\u5728\u7684Linux\u7248\u672c\u5757\u7684\u5927\u5c0f\u4e3a1kb\uff09<\/strong><\/span><\/div>\n

bi: \u6bcf\u79d2\u8bfb\u53d6\u7684\u5757\u6570<\/p>\n

bo: \u6bcf\u79d2\u5199\u5165\u7684\u5757\u6570<\/p>\n

\u6ce8\u610f:<\/p>\n

\u968f\u673a\u78c1\u76d8\u8bfb\u5199\u7684\u65f6\u5019\uff0c\u8fd92\u4e2a\u503c\u8d8a\u5927\uff08\u5982\u8d85\u51fa1024k)\uff0c\u80fd\u770b\u5230CPU\u5728IO\u7b49\u5f85\u7684\u503c\u4e5f\u4f1a\u8d8a\u5927\u3002<\/p>\n

5.system\uff08\u7cfb\u7edf\uff09<\/strong><\/span><\/div>\n

in: \u6bcf\u79d2\u4e2d\u65ad\u6570\uff0c\u5305\u62ec\u65f6\u949f\u4e2d\u65ad\u3002<\/p>\n

cs: \u6bcf\u79d2\u4e0a\u4e0b\u6587\u5207\u6362\u6570\u3002<\/p>\n

\u6ce8\u610f\uff1a<\/p>\n

\u4e0a\u97622\u4e2a\u503c\u8d8a\u5927\uff0c\u4f1a\u770b\u5230\u7531\u5185\u6838\u6d88\u8017\u7684CPU\u65f6\u95f4\u4f1a\u8d8a\u5927\u3002<\/p>\n

6.CPU\uff08\u4ee5\u767e\u5206\u6bd4\u8868\u793a\uff09<\/strong><\/span><\/div>\n

us: \u7528\u6237\u8fdb\u7a0b\u6267\u884c\u65f6\u95f4\u767e\u5206\u6bd4(user time) us\u7684\u503c\u6bd4\u8f83\u9ad8\u65f6\uff0c\u8bf4\u660e\u7528\u6237\u8fdb\u7a0b\u6d88\u8017\u7684CPU\u65f6\u95f4\u591a\uff0c\u4f46\u662f\u5982\u679c\u957f\u671f\u8d8550%\u7684\u4f7f\u7528\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u8be5\u8003\u8651\u4f18\u5316\u7a0b\u5e8f\u7b97\u6cd5\u6216\u8005\u8fdb\u884c\u52a0\u901f\u3002<\/p>\n

sy: \u5185\u6838\u7cfb\u7edf\u8fdb\u7a0b\u6267\u884c\u65f6\u95f4\u767e\u5206\u6bd4(system time) sy\u7684\u503c\u9ad8\u65f6\uff0c\u8bf4\u660e\u7cfb\u7edf\u5185\u6838\u6d88\u8017\u7684CPU\u8d44\u6e90\u591a\uff0c\u8fd9\u5e76\u4e0d\u662f\u826f\u6027\u8868\u73b0\uff0c\u6211\u4eec\u5e94\u8be5\u68c0\u67e5\u539f\u56e0\u3002<\/p>\n

wa: IO\u7b49\u5f85\u65f6\u95f4\u767e\u5206\u6bd4 wa\u7684\u503c\u9ad8\u65f6\uff0c\u8bf4\u660eIO\u7b49\u5f85\u6bd4\u8f83\u4e25\u91cd\uff0c\u8fd9\u53ef\u80fd\u7531\u4e8e\u78c1\u76d8\u5927\u91cf\u4f5c\u968f\u673a\u8bbf\u95ee\u9020\u6210\uff0c\u4e5f\u6709\u53ef\u80fd\u78c1\u76d8\u51fa\u73b0\u74f6\u9888\uff08\u5757\u64cd\u4f5c\uff09\u3002<\/p>\n

id: \u7a7a\u95f2\u65f6\u95f4\u767e\u5206\u6bd4<\/p>\n

2\uff09\u6bcf\u4e8c\u79d2\u663e\u793a\u4e00\u6b21\u7cfb\u7edf\u5185\u5b58\u7684\u7edf\u8ba1\u4fe1\u606f<\/strong><\/div>\n
linuxidc@linuxidc:~$ vmstat 2\r\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\r\nr\u00a0 b \u4ea4\u6362 \u7a7a\u95f2 \u7f13\u51b2 \u7f13\u5b58\u00a0 si\u00a0 so\u00a0 \u00a0 bi\u00a0 \u00a0 bo\u00a0 in\u00a0 cs us sy id wa st\r\n4\u00a0 0\u00a0 \u00a0 \u00a0 0 113256\u00a0 61612 889820\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 74\u00a0 \u00a0 29\u00a0 53\u00a0 143\u00a0 1\u00a0 1 98\u00a0 0\u00a0 0\r\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 113256\u00a0 61612 889820\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 60\u00a0 209\u00a0 1\u00a0 1 99\u00a0 0\u00a0 0\r\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 113256\u00a0 61620 889820\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 8\u00a0 52\u00a0 157\u00a0 0\u00a0 1 99\u00a0 0\u00a0 0\r\n1\u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 99976\u00a0 61620 890356\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 367 2337 31\u00a0 7 63\u00a0 0\u00a0 0\r\n1\u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 99724\u00a0 61620 890356\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 534 2508 35\u00a0 9 56\u00a0 0\u00a0 0\r\n2\u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 99724\u00a0 61620 890340\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 150\u00a0 845 10\u00a0 3 87\u00a0 0\u00a0 0\r\n15\u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 97196\u00a0 61660 890368\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 134\u00a0 78\u00a0 464 16\u00a0 2 82\u00a0 0\u00a0 0\r\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 109388\u00a0 61680 890208\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 162\u00a0 526 4604 37 12 51\u00a0 0\u00a0 0\r\n<\/pre>\n

\"\"<\/p>\n

3\uff09\u3001vmstat\u6bcf\u4e8c\u79d2\u663e\u793a\u4e00\u6b21\u7cfb\u7edf\u5185\u5b58\u7684\u7edf\u8ba1\u4fe1\u606f,\u603b\u51715\u6b21<\/strong><\/div>\n

linuxidc@linuxidc:~\/\u684c\u9762\/www.linuxidc.com$ vmstat 2 5
\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
\nr\u00a0 b \u4ea4\u6362 \u7a7a\u95f2 \u7f13\u51b2 \u7f13\u5b58\u00a0 si\u00a0 so\u00a0 \u00a0 bi\u00a0 \u00a0 bo\u00a0 in\u00a0 cs us sy id wa st
\n5\u00a0 0\u00a0 \u00a0 \u00a0 0 111612\u00a0 61776 889992\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 74\u00a0 \u00a0 29\u00a0 54\u00a0 146\u00a0 1\u00a0 1 98\u00a0 0\u00a0 0
\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 111360\u00a0 617706 889992\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 58\u00a0 201\u00a0 1\u00a0 1 99\u00a0 0\u00a0 0
\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 111360\u00a0 61784 889984\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 12\u00a0 54\u00a0 161\u00a0 1\u00a0 1 98\u00a0 1\u00a0 0
\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 111360\u00a0 61784 889992\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 55\u00a0 163\u00a0 1\u00a0 1 98\u00a0 0\u00a0 0
\n0\u00a0 0\u00a0 \u00a0 \u00a0 0 111360\u00a0 61784 889992\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 52\u00a0 155\u00a0 1\u00a0 1 99\u00a0 0\u00a0 0<\/p>\n

\"\"<\/p>\n

4\uff09\u3001vmstat -d\u3000\u663e\u793a\u78c1\u76d8\u7684\u4fe1\u606f<\/strong><\/div>\n
linuxidc@linuxidc:~\/\u684c\u9762\/www.linuxidc.com$ vmstat -d\r\ndisk- ------------reads------------ ------------writes----------- -----IO------\r\n\u603b\u7528\u91cf merged\u00a0 \u6247\u533a\u00a0 \u00a0 \u00a0 ms \u603b\u7528\u91cf merged\u00a0 \u6247\u533a\u00a0 \u00a0 \u00a0 ms\u00a0 \u00a0 cur\u00a0 \u00a0 sec\r\nloop0\u00a0 \u00a0 43\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 676\u00a0 \u00a0 447\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop1\u00a0 \u00a0 38\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 226\u00a0 \u00a0 450\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop2\u00a0 \u00a0 54\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2124\u00a0 \u00a0 998\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop3\u00a0 \u00a0 42\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 674\u00a0 \u00a0 695\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop4\u00a0 \u00a0 37\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 664\u00a0 \u00a0 117\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop5\u00a0 \u00a0 44\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 678\u00a0 \u00a0 549\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop6\u00a0 \u00a0 40\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 230\u00a0 \u00a0 127\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop7\u00a0 \u00a0 62\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2140\u00a0 \u00a0 846\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nsda\u00a0 \u00a0 23949\u00a0 3166 1621538\u00a0 221257\u00a0 9490\u00a0 10847\u00a0 654856\u00a0 221706\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 117\r\nsr0\u00a0 \u00a0 \u00a0 35\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2132\u00a0 \u00a0 \u00a0 64\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop8\u00a0 1438\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 4802\u00a0 27055\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 2\r\nloop9\u00a0 \u00a0 216\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2476\u00a0 \u00a0 2324\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop10\u00a0 \u00a0 40\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 670\u00a0 \u00a0 567\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop11\u00a0 \u00a0 92\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2162\u00a0 \u00a0 2091\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop12\u00a0 \u00a0 39\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 668\u00a0 \u00a0 579\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop13\u00a0 \u00a0 54\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2152\u00a0 \u00a0 647\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop14\u00a0 \u00a0 47\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2132\u00a0 \u00a0 871\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\nloop15\u00a0 \u00a0 64\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 2126\u00a0 \u00a0 \u00a0 51\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 0\r\n<\/pre>\n

\"\"<\/p>\n

merged:\u8868\u793a\u4e00\u6b21\u6765\u81ea\u4e8e\u5408\u5e76\u7684\u5199\/\u8bfb\u8bf7\u6c42,\u4e00\u822c\u7cfb\u7edf\u4f1a\u628a\u591a\u4e2a\u8fde\u63a5\/\u90bb\u8fd1\u7684\u8bfb\/\u5199\u8bf7\u6c42\u5408\u5e76\u5230\u4e00\u8d77\u6765\u64cd\u4f5c\u3002<\/p>\n

5\uff09\u3001vmstat -a \u663e\u793a\u6d3b\u8dc3\u5185\u5b58\u4e0e\u975e\u6d3b\u8dc3\u5185\u5b58<\/strong><\/div>\n

\u4f7f\u7528-a\u9009\u9879\u663e\u793a\u6d3b\u8dc3\u548c\u975e\u6d3b\u8dc3\u5185\u5b58\u65f6\uff0c\u6240\u663e\u793a\u7684\u5185\u5bb9\u9664\u589e\u52a0inact\u548cactive\u5916\uff0c\u5176\u4ed6\u663e\u793a\u5185\u5bb9\u4e0e\u4f8b\u5b501\u76f8\u540c\u3002<\/p>\n

linuxidc@linuxidc:~\/\u684c\u9762\/www.linuxidc.com$ vmstat -a\r\nprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\r\nr\u00a0 b \u4ea4\u6362 \u7a7a\u95f2 \u4e0d\u6d3b\u52a8 \u6d3b\u52a8\u00a0 si\u00a0 so\u00a0 \u00a0 bi\u00a0 \u00a0 bo\u00a0 in\u00a0 cs us sy id wa st\r\n4\u00a0 0\u00a0 \u00a0 \u00a0 0\u00a0 99324 408308 1046888\u00a0 \u00a0 0\u00a0 \u00a0 0\u00a0 \u00a0 72\u00a0 \u00a0 29\u00a0 55\u00a0 153\u00a0 1\u00a0 1 98\u00a0 0\u00a0 0\r\n<\/pre>\n

\"\"<\/p>\n

6\uff09\u3001vmstat -f\u3000\u67e5\u770b\u7cfb\u7edf\u5df2\u7ecf\u88abfork\u591a\u5c11\u6b21<\/strong><\/div>\n

linuxidc@linuxidc:~\/<\/a>\u684c\u9762\/www.linuxidc.com$ vmstat -f
\n5100 forks<\/p>\n

\"\"<\/p>\n

7\uff09\u3001vmstat -p tmpfs\u3000\u3000\u67e5\u770b\u7279\u5b9a\u78c1\u76d8\u8bbe\u5907\u7684<\/strong><\/div>\n
linuxidc@linuxidc:~\/\u684c\u9762\/www.linuxidc.com$\u00a0 vmstat -p \/dev\/sda1\r\nsda1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 reads\u00a0 \u00a0 \u00a0 read sectors\u00a0 \u00a0 \u00a0 writes\u00a0 requested writes\r\n23879\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1617802\u00a0 \u00a0 \u00a0 10140\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 668056\r\n<\/pre>\n

\u8bf4\u660e\uff1a
\n\u8fd9\u4e9b\u4fe1\u606f\u4e3b\u8981\u6765\u81ea\u4e8e\/proc\/diskstats\u3002
\nreads:\u3000\u3000\u3000\u3000\u3000\u3000\u3000 \u3000\u6765\u81ea\u4e8e\u8fd9\u4e2a\u5206\u533a\u7684\u8bfb\u7684\u6b21\u6570\u3002
\nread sectors:\u3000\u3000\u3000\u3000\u00a0 \u6765\u81ea\u4e8e\u8fd9\u4e2a\u5206\u533a\u7684\u8bfb\u6247\u533a\u7684\u6b21\u6570\u3002
\nwrites:\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u00a0 \u6765\u81ea\u4e8e\u8fd9\u4e2a\u5206\u533a\u7684\u5199\u7684\u6b21\u6570\u3002
\nrequested writes:\u3000\u00a0 \u6765\u81ea\u4e8e\u8fd9\u4e2a\u5206\u533a\u7684\u5199\u8bf7\u6c42\u6b21\u6570\u3002<\/p>\n

\"\"<\/p>\n

8\uff09\u3001vmstat -m\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u663e\u793aslabinfo<\/p>\n

linuxidc@linuxidc:~\/\u684c\u9762\/www.linuxidc.com$ sudo vmstat -m<\/p>\n

\"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb vmstat\u662fVirtual Meomory Statistics\uff08\u865a\u62df\u5185\u5b58\u7edf\u8ba1\uff09\u7684\u7f29\u5199\uff0c\u53ef\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u7684 […]<\/p>\n","protected":false},"author":323,"featured_media":6024,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-126587","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/126587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=126587"}],"version-history":[{"count":9,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/126587\/revisions"}],"predecessor-version":[{"id":127379,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/126587\/revisions\/127379"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/6024"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=126587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=126587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=126587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}