{"id":4847,"date":"2019-08-31T00:01:50","date_gmt":"2019-08-30T16:01:50","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4847"},"modified":"2019-08-31T00:01:52","modified_gmt":"2019-08-30T16:01:52","slug":"nethogs","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/nethogs","title":{"rendered":"nethogs\u547d\u4ee4 – \u5b9e\u65f6\u7edf\u8ba1\u7f51\u7edc\u5e26\u5bbd\u4f7f\u7528\u7387\u5de5\u5177"},"content":{"rendered":"\n

nethogs\u662f\u4e00\u4e2a\u5c0f\u578b\u7684net top\u5de5\u5177\uff0c\u4e0d\u50cf\u5927\u591a\u6570\u5de5\u5177\u90a3\u6837\u62d6\u6162\u6bcf\u4e2a\u534f\u8bae\u6216\u8005\u662f\u6bcf\u4e2a\u5b50\u7f51\u7684\u901f\u5ea6\u800c\u662f\u6309\u7167\u8fdb\u7a0b\u8fdb\u884c\u5e26\u5bbd\u5206\u7ec4\u3002NetHogs\u4e0d\u9700\u8981\u4f9d\u8d56\u8f7d\u5165\u67d0\u4e2a\u7279\u6b8a\u7684\u5185\u6838\u6a21\u5757\u3002\u5982\u679c\u53d1\u751f\u4e86\u7f51\u7edc\u963b\u585e\u4f60\u53ef\u4ee5\u542f\u52a8NetHogs\u7acb\u5373\u770b\u5230\u54ea\u4e2aPID\u9020\u6210\u7684\u8fd9\u79cd\u72b6\u51b5\u3002\u8fd9\u6837\u5c31\u5f88\u5bb9\u6613\u627e\u51fa\u54ea\u4e2a\u7a0b\u5e8f\u8dd1\u98de\u4e86\u7136\u540e\u7a81\u7136\u5360\u7528\u4f60\u7684\u5e26\u5bbd\u3002 <\/p>\n\n\n\n

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

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
device(s)<\/td>\u8981\u76d1\u63a7\u7684\u8bbe\u5907\uff0c\u9ed8\u8ba4\u201ceth0\u201d<\/td><\/tr>
-d <\/td>\u4ee5\u79d2\u4e3a\u5355\u4f4d\u7684\u754c\u9762\u5237\u65b0\u9891\u7387\u3002\u7528\u4e8e\u63a7\u5236\u754c\u9762\u7684\u66f4\u65b0\u901f\u5ea6\u3002\u9ed8\u8ba4\u4e3a\u4e00\u79d2<\/td><\/tr>
-v <\/td>\u9009\u62e9\u67e5\u770b\u6a21\u5f0f\u3002\u53c2\u6570mode\u7684\u53d6\u503c\u4e3a\uff1a\u201c0\u201d = KB\/s\uff1b\u201c1\u201d = total KB, \u201c2\u201d = total B, \u201c3\u201d = total MB\u3002\u9ed8\u8ba4\u4e3a\u201c0\u201d<\/td><\/tr>
-p<\/td>\u6df7\u6742\u6a21\u5f0f\u7684\u55c5\u63a2\u5668<\/td><\/tr>
-t<\/td>\u8ffd\u8e2a\u6a21\u5f0f<\/td><\/tr>
--<\/strong>c<\/td>\u9650\u5236\u5237\u65b0\u7684\u6b21\u6570\uff0c\u901a\u5e38\u4e0e-t\u9009\u9879\u914d\u5408\u4f7f\u7528<\/td><\/tr>
-s<\/td>\u6839\u636e\u8f93\u51fa\u4e2d\u7684SENT\u5217\u8fdb\u884c\u6392\u5e8f<\/td><\/tr><\/tbody><\/table>\n\n\n\n

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

\u8bbe\u7f6e5\u79d2\u5237\u65b0\u4e00\u6b21\uff1a<\/p>\n\n\n\n

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

\u76d1\u89c6\u8bbe\u5907\uff08eth0\uff09\u7684\u7f51\u7edc\u5e26\u5bbd\uff1a<\/p>\n\n\n\n

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

\u4f7f\u7528\u8ffd\u8e2a\u6a21\u5f0f\uff1a<\/p>\n\n\n\n

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

nethogs\u662f\u4e00\u4e2a\u5c0f\u578b\u7684net top\u5de5\u5177\uff0c\u4e0d\u50cf\u5927\u591a\u6570\u5de5\u5177\u90a3\u6837\u62d6\u6162\u6bcf\u4e2a\u534f\u8bae\u6216\u8005\u662f\u6bcf\u4e2a\u5b50\u7f51\u7684\u901f\u5ea6\u800c\u662f\u6309\u7167\u8fdb\u7a0b\u8fdb […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4847"}],"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=4847"}],"version-history":[{"count":7,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4847\/revisions"}],"predecessor-version":[{"id":4934,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4847\/revisions\/4934"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}