{"id":6114,"date":"2019-12-30T23:01:14","date_gmt":"2019-12-30T15:01:14","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6114"},"modified":"2020-01-11T23:38:26","modified_gmt":"2020-01-11T15:38:26","slug":"dstat","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/dstat","title":{"rendered":"dstat\u547d\u4ee4 – \u5168\u80fd\u7cfb\u7edf\u4fe1\u606f\u7edf\u8ba1\u5de5\u5177"},"content":{"rendered":"\n

dstat\u547d\u4ee4\u662f\u4e00\u4e2a\u7528\u6765\u66ff\u6362vmstat\u3001iostat\u3001netstat\u3001nfsstat\u548cifstat\u8fd9\u4e9b\u547d\u4ee4\u7684\u5de5\u5177\uff0c\u662f\u4e00\u4e2a\u5168\u80fd\u7cfb\u7edf\u4fe1\u606f\u7edf\u8ba1\u5de5\u5177\u3002\u4e0esysstat\u76f8\u6bd4\uff0cdstat\u62e5\u6709\u4e00\u4e2a\u5f69\u8272\u7684\u754c\u9762\uff0c\u5728\u624b\u52a8\u89c2\u5bdf\u6027\u80fd\u72b6\u51b5\u65f6\uff0c\u6570\u636e\u6bd4\u8f83\u663e\u773c\u5bb9\u6613\u89c2\u5bdf\uff1b\u800c\u4e14dstat\u652f\u6301\u5373\u65f6\u5237\u65b0\uff0c\u8b6c\u5982\u8f93\u5165dstat 3\u5373\u6bcf\u4e09\u79d2\u6536\u96c6\u4e00\u6b21\uff0c\u4f46\u6700\u65b0\u7684\u6570\u636e\u90fd\u4f1a\u6bcf\u79d2\u5237\u65b0\u663e\u793a\u3002\u548csysstat\u76f8\u540c\u7684\u662f\uff0cdstat\u4e5f\u53ef\u4ee5\u6536\u96c6\u6307\u5b9a\u7684\u6027\u80fd\u8d44\u6e90\uff0c\u8b6c\u5982dstat -c\u5373\u663e\u793aCPU\u7684\u4f7f\u7528\u60c5\u51b5\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong> dstat [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong> <\/p>\n\n\n\n

-c<\/td>\u663e\u793aCPU\u7cfb\u7edf\u5360\u7528\uff0c\u7528\u6237\u5360\u7528\uff0c\u7a7a\u95f2\uff0c\u7b49\u5f85\uff0c\u4e2d\u65ad\uff0c\u8f6f\u4ef6\u4e2d\u65ad\u7b49\u4fe1\u606f<\/td><\/tr>
-d<\/td>\u663e\u793a\u78c1\u76d8\u8bfb\u5199\u6570\u636e\u5927\u5c0f<\/td><\/tr>
-n<\/td>\u663e\u793a\u7f51\u7edc\u72b6\u6001<\/td><\/tr>
-l<\/td>\u663e\u793a\u7cfb\u7edf\u8d1f\u8f7d\u60c5\u51b5<\/td><\/tr>
-m<\/td>\u663e\u793a\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/td><\/tr>
-g<\/td>\u663e\u793a\u9875\u9762\u4f7f\u7528\u60c5\u51b5<\/td><\/tr>
-p<\/td>\u663e\u793a\u8fdb\u7a0b\u72b6\u6001<\/td><\/tr>
-s<\/td>\u663e\u793a\u4ea4\u6362\u5206\u533a\u4f7f\u7528\u60c5\u51b5<\/td><\/tr>
-r<\/td>I\/O\u8bf7\u6c42\u60c5\u51b5<\/td><\/tr>
-y<\/td>\u7cfb\u7edf\u72b6\u6001<\/td><\/tr>
--ipc<\/td>\u663e\u793aipc\u6d88\u606f\u961f\u5217\uff0c\u4fe1\u53f7\u7b49\u4fe1\u606f<\/td><\/tr>
--socket<\/td>\u7528\u6765\u663e\u793atcp udp\u7aef\u53e3\u72b6\u6001<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong> <\/p>\n\n\n\n

\u5206\u522b\u663e\u793acpu\u3001disk\u3001net\u3001page\u3001system\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dstat <\/pre>\n\n\n\n

\u6bcf\u4e09\u79d2\u6536\u96c6\u4e00\u6b21 cpu\u3001disk\u3001net\u3001page\u3001system \u4fe1\u606f \uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# dstat 3<\/pre>\n\n\n\n

\u663e\u793aCPU\u7cfb\u7edf\u5360\u7528\uff0c\u7528\u6237\u5360\u7528\uff0c\u7a7a\u95f2\uff0c\u7b49\u5f85\uff0c\u4e2d\u65ad\uff0c\u8f6f\u4ef6\u4e2d\u65ad\u7b49\u4fe1\u606f \uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# dstat -c<\/pre>\n\n\n\n

\u663e\u793a\u78c1\u76d8\u8bfb\u5199\u6570\u636e\u5927\u5c0f \uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# dstat -d<\/pre>\n\n\n\n

\u663e\u793a\u7f51\u7edc\u72b6\u6001\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# dstat -n<\/pre>\n","protected":false},"excerpt":{"rendered":"

dstat\u547d\u4ee4\u662f\u4e00\u4e2a\u7528\u6765\u66ff\u6362vmstat\u3001iostat\u3001netstat\u3001nfsstat\u548cifstat\u8fd9\u4e9b\u547d\u4ee4\u7684 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6114"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6114"}],"version-history":[{"count":14,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6114\/revisions"}],"predecessor-version":[{"id":6411,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6114\/revisions\/6411"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}