{"id":3987,"date":"2020-05-30T21:20:06","date_gmt":"2020-05-30T13:20:06","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=3987"},"modified":"2020-05-30T21:20:06","modified_gmt":"2020-05-30T13:20:06","slug":"linux%e6%9f%a5%e7%9c%8b%e5%b8%a6%e5%ae%bd%e5%8d%a0%e7%94%a8%e6%83%85%e5%86%b5%e5%91%bd%e4%bb%a4iftop","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/3987.html","title":{"rendered":"Linux\u67e5\u770b\u5e26\u5bbd\u5360\u7528\u60c5\u51b5\u547d\u4ee4iftop"},"content":{"rendered":"

Linux\u7cfb\u7edf\u7684\u670d\u52a1\u5668\uff0c\u5982\u679c\u7ecf\u5e38\u5361\u987f\uff0c\u5c31\u8981\u67e5\u770b\u4e00\u4e0b\u5bbd\u5e26\u7684\u4f7f\u7528\u60c5\u51b5 \uff0c\u67e5\u770b\u5e26\u5bbd\u5360\u7528\u60c5\u51b5\u8981\u7528\u547d\u4ee4iftop\uff0c\u6211\u4eec\u9996\u5148\u5b89\u88c5iftop\uff08\u5b98\u7f51\u5730\u5740\uff1ahttp:\/\/www.ex-parrot.com\/~pdw\/iftop\/\uff09<\/p>\n

CentOS\u7cfb\u7edf\u5b89\u88c5\u547d\u4ee4\uff1a<\/p>\n

yum install iftop<\/code><\/pre>\n

Debian\u7cfb\u7edf\u5b89\u88c5\u547d\u4ee4\uff1a<\/p>\n

apt-get install iftop<\/code><\/pre>\n

\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4f1a\u6709\u63d0\u793a\u8f93\u5165Y\u540e\u7ee7\u7eed\u5b89\u88c5\u5b8c\u6210\u3002<\/p>\n

\"\"<\/a><\/p>\n

\u5b89\u88c5\u597d\u540e\u5728\u670d\u52a1\u5668\u6267\u884ciftop -i eth1\u5c31\u53ef\u4ee5\u67e5\u770b\u670d\u52a1\u5668\u516c\u7f51\u7f51\u5361\u5e26\u5bbd\u4f7f\u7528\u60c5\u51b5(\u5982\u679c\u53ea\u6267\u884ciftop\u9ed8\u8ba4\u68c0\u6d4b\u7b2c\u4e00\u5757\u7f51\u5361\u4f7f\u7528\u60c5\u51b5\uff0c\u8fd9\u6837\u67e5\u7684\u4f1a\u662f\u5185\u7f51\u7f51\u5361eth0\u3002\uff09<\/p>\n

iftop -i eth0 -P<\/code><\/pre>\n

\"\"<\/a><\/p>\n

 <\/p>\n

iftop\u754c\u9762\u542b\u4e49\u5982\u4e0b<\/p>\n

\u7b2c\u4e00\u884c\uff1a\u5e26\u5bbd\u663e\u793a<\/p>\n

\u4e2d\u95f4\u90e8\u5206\uff1a\u5916\u90e8\u8fde\u63a5\u5217\u8868\uff0c\u5373\u8bb0\u5f55\u4e86\u54ea\u4e9bip\u6b63\u5728\u548c\u672c\u673a\u7684\u7f51\u7edc\u8fde\u63a5<\/p>\n

\u4e2d\u95f4\u90e8\u5206\u53f3\u8fb9\uff1a\u5b9e\u65f6\u53c2\u6570\u5206\u522b\u662f\u8be5\u8bbf\u95eeip\u8fde\u63a5\u5230\u672c\u673a2\u79d2\uff0c10\u79d2\u548c40\u79d2\u7684\u5e73\u5747\u6d41\u91cf=>\u4ee3\u8868\u53d1\u9001\u6570\u636e\uff0c<= \u4ee3\u8868\u63a5\u6536\u6570\u636e<\/p>\n

\u5e95\u90e8\u4e09\u884c\uff1a\u8868\u793a\u53d1\u9001\uff0c\u63a5\u6536\u548c\u5168\u90e8\u7684\u6d41\u91cf<\/p>\n

\u5e95\u90e8\u4e09\u884c\u7b2c\u4e8c\u5217\uff1a\u4e3a\u4f60\u8fd0\u884ciftop\u5230\u76ee\u524d\u6d41\u91cf<\/p>\n

\u5e95\u90e8\u4e09\u884c\u7b2c\u4e09\u5217\uff1a\u4e3a\u9ad8\u5cf0\u503c<\/p>\n

\u5e95\u90e8\u4e09\u884c\u7b2c\u56db\u5217\uff1a\u4e3a\u5e73\u5747\u503c
\n\u901a\u8fc7iftop\u7684\u754c\u9762\u5f88\u5bb9\u6613\u627e\u5230\u54ea\u4e2aip\u5728\u5360\u7528\u7f51\u7edc\u6d41\u91cf\uff0c\u8fd9\u4e2a\u662fifstat\u505a\u4e0d\u5230\u7684\u3002\u4e0d\u8fc7iftop\u7684\u6d41\u91cf\u663e\u793a\u5355\u4f4d\u662fMb,\u8fd9\u4e2ab\u662fbit\uff0c\u662f\u4f4d\uff0c\u4e0d\u662f\u5b57\u8282\uff0c\u800cifstat\u7684KB\uff0c\u8fd9\u4e2aB\u5c31\u662f\u5b57\u8282\u4e86\uff0cbyte\u662fbit\u76848\u500d\u3002<\/p>\n

\u8fdb\u5165iftop\u753b\u9762\u540e\u7684\u4e00\u4e9b\u64cd\u4f5c\u547d\u4ee4(\u6ce8\u610f\u5927\u5c0f\u5199)<\/p>\n

\u6309h\u5207\u6362\u662f\u5426\u663e\u793a\u5e2e\u52a9;<\/p>\n

\u6309n\u5207\u6362\u663e\u793a\u672c\u673a\u7684IP\u6216\u4e3b\u673a\u540d;<\/p>\n

\u6309s\u5207\u6362\u662f\u5426\u663e\u793a\u672c\u673a\u7684host\u4fe1\u606f;<\/p>\n

\u6309d\u5207\u6362\u662f\u5426\u663e\u793a\u8fdc\u7aef\u76ee\u6807\u4e3b\u673a\u7684host\u4fe1\u606f;<\/p>\n

\u6309t\u5207\u6362\u663e\u793a\u683c\u5f0f\u4e3a2\u884c\/1\u884c\/\u53ea\u663e\u793a\u53d1\u9001\u6d41\u91cf\/\u53ea\u663e\u793a\u63a5\u6536\u6d41\u91cf;<\/p>\n

\u6309N\u5207\u6362\u663e\u793a\u7aef\u53e3\u53f7\u6216\u7aef\u53e3\u670d\u52a1\u540d\u79f0;<\/p>\n

\u6309S\u5207\u6362\u662f\u5426\u663e\u793a\u672c\u673a\u7684\u7aef\u53e3\u4fe1\u606f;<\/p>\n

\u6309D\u5207\u6362\u662f\u5426\u663e\u793a\u8fdc\u7aef\u76ee\u6807\u4e3b\u673a\u7684\u7aef\u53e3\u4fe1\u606f;<\/p>\n

\u6309p\u5207\u6362\u662f\u5426\u663e\u793a\u7aef\u53e3\u4fe1\u606f;<\/p>\n

\u6309P\u5207\u6362\u6682\u505c\/\u7ee7\u7eed\u663e\u793a;<\/p>\n

\u6309b\u5207\u6362\u662f\u5426\u663e\u793a\u5e73\u5747\u6d41\u91cf\u56fe\u5f62\u6761;<\/p>\n

\u6309B\u5207\u6362\u8ba1\u7b972\u79d2\u621610\u79d2\u621640\u79d2\u5185\u7684\u5e73\u5747\u6d41\u91cf;<\/p>\n

\u6309T\u5207\u6362\u662f\u5426\u663e\u793a\u6bcf\u4e2a\u8fde\u63a5\u7684\u603b\u6d41\u91cf;<\/p>\n

\u6309l\u6253\u5f00\u5c4f\u5e55\u8fc7\u6ee4\u529f\u80fd\uff0c\u8f93\u5165\u8981\u8fc7\u6ee4\u7684\u5b57\u7b26\uff0c\u6bd4\u5982ip,\u6309\u56de\u8f66\u540e\uff0c\u5c4f\u5e55\u5c31\u53ea\u663e\u793a\u8fd9\u4e2aIP\u76f8\u5173\u7684\u6d41\u91cf\u4fe1\u606f;<\/p>\n

\u6309L\u5207\u6362\u663e\u793a\u753b\u9762\u4e0a\u8fb9\u7684\u523b\u5ea6;\u523b\u5ea6\u4e0d\u540c\uff0c\u6d41\u91cf\u56fe\u5f62\u6761\u4f1a\u6709\u53d8\u5316;<\/p>\n

\u6309j\u6216\u6309k\u53ef\u4ee5\u5411\u4e0a\u6216\u5411\u4e0b\u6eda\u52a8\u5c4f\u5e55\u663e\u793a\u7684\u8fde\u63a5\u8bb0\u5f55;<\/p>\n

\u63091\u62162\u62163\u53ef\u4ee5\u6839\u636e\u53f3\u4fa7\u663e\u793a\u7684\u4e09\u5217\u6d41\u91cf\u6570\u636e\u8fdb\u884c\u6392\u5e8f;<\/p>\n

\u6309<\u6839\u636e\u5de6\u8fb9\u7684\u672c\u673a\u540d\u6216IP\u6392\u5e8f;<\/p>\n

\u6309>\u6839\u636e\u8fdc\u7aef\u76ee\u6807\u4e3b\u673a\u7684\u4e3b\u673a\u540d\u6216IP\u6392\u5e8f;<\/p>\n

\u6309o\u5207\u6362\u662f\u5426\u56fa\u5b9a\u53ea\u663e\u793a\u5f53\u524d\u7684\u8fde\u63a5;<\/p>\n

\u6309f\u53ef\u4ee5\u7f16\u8f91\u8fc7\u6ee4\u4ee3\u7801\uff1b<\/p>\n

\u6309!\u53ef\u4ee5\u4f7f\u7528shell\u547d\u4ee4\uff1b<\/p>\n

\u6309q\u9000\u51fa\u76d1\u63a7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Linux\u7cfb\u7edf\u7684\u670d\u52a1\u5668\uff0c\u5982\u679c\u7ecf\u5e38\u5361\u987f\uff0c\u5c31\u8981\u67e5\u770b\u4e00\u4e0b\u5bbd\u5e26\u7684\u4f7f\u7528\u60c5\u51b5 \uff0c\u67e5\u770b\u5e26\u5bbd\u5360\u7528\u60c5\u51b5\u8981\u7528\u547d\u4ee4iftop\uff0c\u6211\u4eec\u9996 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1258,337,1257],"class_list":["post-3987","post","type-post","status-publish","format-standard","hentry","category-jiaocheng","tag-iftop","tag-linux","tag-1257"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/3987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=3987"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/3987\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=3987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=3987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=3987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}