{"id":199989,"date":"2020-09-13T08:17:00","date_gmt":"2020-09-13T00:17:00","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=199989"},"modified":"2020-09-01T16:17:32","modified_gmt":"2020-09-01T08:17:32","slug":"linux-monitoring-tools","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-monitoring-tools.html","title":{"rendered":"\u4e3a\u4f60\u4ecb\u7ecd4\u4e2a\u8d85\u5b9e\u7528\u7684Linux\u76d1\u63a7\u5de5\u5177"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e0b\u9762\u662f Linux \u4e0b 4 \u4e2a\u65e5\u5e38\u4f7f\u7528\u7387\u975e\u5e38\u9ad8\u7684\u76d1\u63a7\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u51c6\u786e\u5feb\u901f\u7684\u8bca\u65ad\u7cfb\u7edf\u95ee\u9898\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u4e0b\u9762\u662f Linux \u4e0b 4 \u4e2a\u65e5\u5e38\u4f7f\u7528\u7387\u975e\u5e38\u9ad8\u7684\u76d1\u63a7\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u51c6\u786e\u5feb\u901f\u7684\u8bca\u65ad\u7cfb\u7edf\u95ee\u9898\u3002<\/p>\n

1. iotop<\/strong><\/strong><\/div>\n

\"\"<\/p>\n

\u5982\u679c\u4f60\u60f3\u77e5\u9053\u67d0\u4e9b\u8fdb\u7a0b\u4f7f\u7528\u4e86\u591a\u5c11\u4f60\u5b9d\u8d35\u7684 I\/O \u8d44\u6e90\uff0c\u90a3\u4e48\u5c31\u4f7f\u7528 iotop \u5427\u3002<\/p>\n

iostat \u547d\u4ee4\u4e5f\u662f\u67e5\u770b I\/O \u72b6\u6001\u7684\uff0c\u4f46\u4ed6\u76d1\u63a7\u7684\u662f\u7cfb\u7edf\u7ea7\u522b\u7684 I\/O \u60c5\u51b5\uff0c\u800c iotop \u76d1\u63a7\u7684\u662f\u8fdb\u7a0b\u7ea7\u522b\u7684\uff0c\u53ef\u4ee5\u76d1\u63a7\u5230\u54ea\u4e00\u4e2a\u8fdb\u7a0b\u4f7f\u7528\u7684 I\/O \u4fe1\u606f\u3002<\/p>\n

2. htop<\/strong><\/strong><\/div>\n

\"\"<\/p>\n

htop \u662f\u4f20\u7edf top \u7684\u589e\u5f3a\u7248\uff0c\u5177\u6709\u66f4\u597d\u7684\u89c6\u89c9\u6548\u679c\uff0c\u66f4\u5bb9\u6613\u7406\u89e3\u5f53\u524d\u7cfb\u7edf\u7684\u72b6\u51b5\u3002<\/p>\n

\u53ef\u4ee5\u6e05\u695a\u770b\u5230 CPU \u6bcf\u4e2a\u6838\u513f\u7684\u4f7f\u7528\u72b6\u51b5\uff0c\u4e0d\u50cf top \u90a3\u6837\u9690\u6666\u3002<\/p>\n

\u540c\u6837\uff0c\u5185\u5b58\u7684\u4f7f\u7528\u60c5\u51b5\u4e5f\u5f88\u6e05\u6670\u3002<\/p>\n

\u4e0d\u4ec5\u6709\u4f20\u7edf\u7684\u767e\u5206\u6bd4\u6570\u636e\uff0c\u8fd8\u4f7f\u7528\u4e86\u6761\u5f62\u56fe\u6765\u663e\u793aCPU\u548c\u5185\u5b58\u7684\u5ea6\u91cf\u6307\u6807\uff0c\u53ef\u8bfb\u6027\u6bd4 top \u597d\u4e86\u5f88\u591a\u3002<\/p>\n

\u800c\u4e14\u64cd\u4f5c\u4e5f\u66f4\u52a0\u4fbf\u5229\uff0c\u4f8b\u5982\u7ec8\u6b62\u8fdb\u7a0b\u53ef\u4ee5\u4e0d\u7528\u8f93\u5165\u8fdb\u7a0bID\uff0c\u8fd8\u53ef\u4ee5\u4e00\u6b21\u7ec8\u6b62\u591a\u4e2a\u8fdb\u7a0b\u3002<\/p>\n

htop \u8fd8\u6709\u5f88\u591a\u4fbf\u5229\u7684\u64cd\u4f5c\uff0c\u63a8\u8350\u7528\u4ed6\u6765\u66ff\u4ee3 top\u3002<\/p>\n

3. IPTraf<\/strong><\/strong><\/div>\n

\"\"<\/p>\n

IPTraf \u662f\u8bca\u65ad\u7f51\u7edc\u95ee\u9898\u7684\u5229\u5668\uff0c\u4ed6\u53ef\u4ee5\u76d1\u63a7\u7cfb\u7edf\u7684\u6240\u6709\u7f51\u7edc\u6d41\u91cf\u3002<\/p>\n

\u53ef\u4ee5\u4e3a\u6307\u5b9a\u7684\u7aef\u53e3\u3001\u4f20\u8f93\u7c7b\u578b\u8bbe\u7f6e\u8fc7\u6ee4\u5668\u3002<\/p>\n

IPTraf \u5c31\u50cf\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 Wireshark\u3002<\/p>\n

\u901a\u8fc7 IPTraf \u53ef\u4ee5\u505a\u5f88\u591a\u7ec6\u81f4\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u6309\u603b\u4f53\u6570\u636e\u5305\u5927\u5c0f\u5bf9\u6d41\u91cf\u8fdb\u884c\u7edf\u8ba1\u7ec6\u5206\uff1a<\/p>\n

\"\"<\/p>\n

tcpdump \u6216\u8005 tshark \u90fd\u4e0e IPTraf \u6709\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u4f46\u662f IPTraf \u4f7f\u7528\u66f4\u65b9\u4fbf\uff0c\u6709\u83dc\u5355\uff0c\u5f88\u5bb9\u6613\u64cd\u4f5c\u3002<\/p>\n

4. Monit<\/strong><\/strong><\/div>\n

\"\"<\/p>\n

Monit \u662f\u4e00\u4e2a\u975e\u5e38\u7075\u6d3b\u7684\u5de5\u5177\uff0c\u6709\u5f88\u591a\u79cd\u914d\u7f6e\u65b9\u5f0f\uff0c\u652f\u6301\u4e0d\u540c\u7c7b\u578b\u7684\u9608\u503c\u548c\u6027\u80fd\u544a\u8b66\u3002<\/p>\n

Monit \u5141\u8bb8\u5bf9\u8fdb\u7a0b\u3001\u7aef\u53e3\u3001\u6587\u4ef6\u7b49\u76ee\u6807\u8fdb\u884c\u76d1\u63a7\uff0c\u5e76\u4e14\u53ef\u4ee5\u8bbe\u7f6e\u52a8\u6001\u7684\u544a\u8b66\u6a21\u5f0f\u3002<\/p>\n

\u4f8b\u5982\u4f60\u60f3\u76d1\u63a7\u4e00\u4e2a\u8fdb\u7a0b\uff0c\u786e\u4fdd\u4ed6\u662f\u8fd0\u884c\u7684\uff0c\u5982\u679c\u8fdb\u7a0b\u6302\u6389\u4e86\uff0c\u5c31\u91cd\u65b0\u542f\u52a8\uff0c\u5982\u679c\u5faa\u73af\u6302\u6389\u591a\u6b21\uff0c\u5c31\u4e0d\u91cd\u542f\u4e86\uff0c\u800c\u662f\u53d1\u9001\u4e00\u4e2a\u544a\u8b66\u3002\u8fd9\u7c7b\u9700\u6c42\u53ef\u4ee5\u901a\u8fc7 Monit \u8f7b\u677e\u641e\u5b9a\u3002<\/p>\n

Monit \u8fd8\u6709\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 web \u754c\u9762\uff1a<\/p>\n

\"\"<\/p>\n

\u4e0d\u7ba1\u662f\u7ba1\u7406\u4e00\u53f0\u670d\u52a1\u5668\u8fd8\u662f\u591a\u53f0\uff0cMonit \u90fd\u662f\u4e00\u4e2a\u76d1\u63a7\u5229\u5668\uff0c\u4f7f\u7528\u6781\u5176\u7b80\u5355\u3001\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n

\u5c0f\u7ed3<\/strong><\/strong><\/div>\n

\u611f\u8c22\u9605\u8bfb\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e0b\u9762\u662f Linux \u4e0b 4 \u4e2a\u65e5\u5e38\u4f7f\u7528\u7387\u975e\u5e38\u9ad8\u7684\u76d1\u63a7\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u51c6\u786e\u5feb\u901f\u7684\u8bca\u65ad\u7cfb\u7edf\u95ee\u9898\u3002 \u5982\u679c\u4f60\u60f3\u77e5\u9053\u67d0 […]<\/p>\n","protected":false},"author":1898,"featured_media":199997,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[598],"class_list":["post-199989","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread","tag-linux"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/199989","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\/1898"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=199989"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/199989\/revisions"}],"predecessor-version":[{"id":199998,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/199989\/revisions\/199998"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/199997"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=199989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=199989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=199989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}