{"id":287860,"date":"2023-11-23T04:01:30","date_gmt":"2023-11-22T20:01:30","guid":{"rendered":"https:\/\/lrxjmw.cn\/rhzlxtzaznxx.html"},"modified":"2023-11-23T04:01:30","modified_gmt":"2023-11-22T20:01:30","slug":"rhzlxtzaznxx","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rhzlxtzaznxx.html","title":{"rendered":"\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5NetHogsNetHogs\u9009\u9879\u548c\u66f4\u6539\u987a\u5e8f"},"content":{"rendered":"

\u6982\u8ff0<\/p>\n

\u7f51\u8def\u4e0a\u6709\u5927\u91cf\u53ef\u7528\u4e8eLinux<\/a>\u64cd\u4f5c\u7cfb\u7edf<\/a>\u7684\u5f00\u6e90<\/a>\u7f51\u8def\u76d1\u63a7\u5de5\u5177\u3002\u5e76\u4e14\u514d\u8d39linux\u4e3b\u673a\uff0c\u5047\u5982\u60a8\u6b63\u5728\u627e\u5bfb\u53ef\u4ee5\u4e3a\u60a8\u63d0\u4f9b\u6bcf\u4f4d\u8fdb\u7a0b\u4f7f\u7528\u60c5\u51b5\u7684\u7f51\u8def\u5e26\u5bbd<\/a>\u5b9e\u65f6\u7edf\u8ba1\u6570\u636e\u7684\u5de5\u5177linux\u64cd\u4f5c\u7cfb\u7edf\u8bba\u6587\uff0c\u8fd9\u4e48NetHogs\u5c31\u662f\u60a8\u5e94\u5f53\u5bfb\u89c5\u7684\u60df\u4e00\u5b9e\u7528\u7a0b\u5e8f\u3002<\/p>\n

NetHogs\u5de5\u51771\u3001\u4ec0\u4e48\u662fNetHogs\uff1f<\/p>\n

NetHogs\u662f\u4e00\u4e2a\u5f00\u6e90\u547d\u4ee4<\/a>\u884c\u7a0b\u5e8f\uff0c\u7528\u4e8e\u76d1\u63a7Linux\u4e2d\u6bcf\u4f4d\u8fdb\u7a0b\u6216\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\u7684\u5b9e\u65f6\u7f51\u8def\u6d41\u91cf\u5e26\u5bbd\u3002NetHogs\u662f\u4e00\u4e2a\u5927\u578b\u7f51\u8def\u5de5\u5177\u3002\u5b83\u4e0d\u50cf\u5927\u591a\u6570\u5de5\u5177\u90a3\u6837\u6309\u5408\u540c\u6216\u5b50\u7f51\u5206\u89e3\u6d41\u91cf\uff0c\u800c\u662f\u6309\u8fdb\u7a0b\u5bf9\u5e26\u5bbd\u8fdb\u884c\u5206\u7ec4\u3002NetHogs\u4e0d\u4f9d\u8d56\u4e00\u4e2a\u7279\u6b8a\u7684\u5185\u6838\u6a21\u5757\u6765\u52a0\u8f7d\u3002\u5047\u5982\u5ffd\u7136\u51fa\u73b0\u5927\u91cf\u7f51\u8def\u6d41\u91cflinux\u67e5\u770b\u7f51\u7edc\u5e26\u5bbd<\/strong>\uff0c\u60a8\u53ef\u4ee5\u542f\u52a8NetHogs\u5e76\u7acb\u523b\u67e5\u770b\u662f\u90a3\u4e2aPID\u9020\u6210\u4e86\u8fd9\u4e9b\u60c5\u51b5\u3002\u8fd9\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u8fa8\u8bc6\u65e9\u5df2\u75af\u72c2\u5e76\u731b\u7136\u5360\u7528\u60a8\u7684\u5e26\u5bbd\u7684\u7a0b\u5e8f\u3002<\/p>\n

2\u3001\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5NetHogs<\/p>\n

NetHogs\u53ef\u4ee5\u5728\u8bf8\u591aLinux\u64cd\u4f5c\u7cfb\u7edf\u5b89\u88c5\u3002\u6309\u7167\u60a8\u6b63\u5728\u8fd0\u884c\u7684Linux\u53d1\u884c\u7248\uff0c\u9009\u62e9\u5408\u9002\u7684\u5b89\u88c5\u65b9\u6cd5<\/p>\n

\u5728RHEL\u3001CentOS\u3001RockyLinux\u548cAlmaLinux\u4e2d\u5b89\u88c5NetHogs<\/p>\n

\u8981\u5b89\u88c5nethogs\uff0c\u4f60\u987b\u8981\u57fa\u4e8eEPEL\u50a8\u5b58\u5e93\uff0c\u4e4b\u540e\u8fd0\u884c\u4ee5\u4e0byum\u547d\u4ee4\u4e0b\u8f7d\u5e76\u5b89\u88c5nethogs\u5305\u3002<\/p>\n

\n

# yum install epel-release\n# yum install nethogs<\/code><\/pre>\n<\/p>\n

\u5728Ubuntu\u3001LinuxMint\u548cDebian\u4e2d\u5b89\u88c5NetHogs<\/p>\n

\u8981\u5b89\u88c5nethogslinux\u67e5\u770b\u7f51\u7edc\u5e26\u5bbd<\/strong>\uff0c\u8bf7\u952e\u5165\u4ee5\u4e0bapt\u547d\u4ee4\u6765\u5b89\u88c5nethogs\u5305\u3002<\/p>\n

\n

$ sudo apt install nethogs<\/code><\/pre>\n<\/p>\n

linux\u67e5\u770b\u7f51\u7edc\u5e26\u5bbd_linux\u5982\u4f55\u67e5\u770b\u5e26\u5bbd\u4f7f\u7528\u7387_linux\u7f51\u7edc\u5e26\u5bbd\u600e\u4e48\u770b<\/p>\n

3\u3001NetHogs\u547d\u4ee4\u884c\u9009\u9879<\/p>\n

NetHogs\u9009\u9879\u548c\u7528\u6cd5\uff1a<\/p>\n

\u4ee5\u4e0b\u662fnethogs\u547d\u4ee4\u884c\u9009\u9879\u3002\u4f7f\u7528\u201c-d\u201d\u6dfb\u52a0\u5237\u65b0\u7387\u548c\u201c\u8bbe\u5907\u540d\u79f0\u201d\u6765\u76d1\u63a7\u7279\u5b9a\u7684\u7ed9\u5b9a\u8bbe\u5907\u6216\u8bbe\u5907\u5e26\u5bbd\uff08\u9ed8\u8ba4\u4e3aeth0\uff09\u3002<\/p>\n

\n

# nethogs -d 5\n$ sudo nethogs -d 5<\/code><\/pre>\n<\/p>\n

\n

# nethogs eth0\n$ sudo nethogs eth0<\/code><\/pre>\n<\/p>\n

\n

# nethogs eth0 eth1\n$ sudo nethogs eth0 eth1<\/code><\/pre>\n<\/p>\n

4\u3001NetHogs\u4ea4\u4e92\u5f0f\u63a7\u4ef6<\/p>\n

\u4ee5\u4e0b\u662fnethogs\u7a0b\u5e8f\u7684\u4e00\u4e9b\u6709\u7528\u7684\u4ea4\u4e92\u63a7\u4ef6\uff08\u9f20\u6807\u5feb\u6377\u952e\uff09\u3002<\/p>\n

5\u3001\u4f7f\u7528\u5c55\u793a<\/p>\n

\u5728centos\u8fd0\u884cnethogs\u5b9e\u7528\u7a0b\u5e8f\u3002<\/p>\n

\n

# nethogs<\/code><\/pre>\n<\/p>\n

linux\u7f51\u7edc\u5e26\u5bbd\u600e\u4e48\u770b_linux\u67e5\u770b\u7f51\u7edc\u5e26\u5bbd_linux\u5982\u4f55\u67e5\u770b\u5e26\u5bbd\u4f7f\u7528\u7387<\/p>\n

\u4ece\u4e0a\u56fe\u4e2d\u6211\u4eec\u770b\u89c1\uff0c\u53d1\u9001\u548c\u63a5\u6536\u884c\u663e\u793a\u4e86\u6bcf\u4f4d\u8fdb\u7a0b\u6b63\u5728\u4f7f\u7528\u7684\u6d41\u91cf\u3002\u5728\u9876\u90e8\u4f30\u7b97\u53d1\u9001\u548c\u63a5\u6536\u7684\u603b\u5e26\u5bbd\u4f7f\u7528\u91cf\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ea4\u4e92\u5f0f\u63a7\u4ef6\u6765\u6392\u5e8f\u548c\u4fee\u6539\u6b21\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u64cd\u4f5c\u7cfb\u7edf\u7684\u5f00\u6e90\u7f51\u7edc\u76d1\u63a7\u5de5\u5177\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u6b63\u5728\u5bfb\u627e\u53ef\u4ee5\u4e3a\u60a8\u63d0\u4f9b\u6bcf\u4e2a\u8fdb\u7a0b\u4f7f\u7528\u60c5\u51b5\u7684\u7f51\u7edc\u5e26\u5bbd\u5b9e\u65f6\u7edf\u8ba1\u6570\u636e\u7684\u5de5\u5177\uff0c\u90a3\u4e48NetHogs\u5c31\u662f\u60a8\u5e94\u8be5\u5bfb\u627e\u7684\u552f\u4e00\u5b9e\u7528\u7a0b\u5e8f\u3002\u4e2d\u6bcf\u4e2a\u8fdb\u7a0b\u6216\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\u7684\u5b9e\u65f6\u7f51\u7edc\u6d41\u91cf\u5e26\u5bbd\u3002\u5b83\u4e0d\u50cf\u5927\u591a\u6570\u5de5\u5177\u90a3\u6837\u6309\u534f\u8bae\u6216\u5b50\u7f51\u5206\u89e3\u6d41\u91cf\uff0c\u800c\u662f\u6309\u8fdb\u7a0b\u5bf9\u5e26\u5bbd\u8fdb\u884c\u5206\u7ec4\u3002<\/p>\n","protected":false},"author":1,"featured_media":287861,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-287860","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/287860","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=287860"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/287860\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/287861"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=287860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=287860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=287860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}