{"id":87209,"date":"2024-01-23T09:38:11","date_gmt":"2024-01-23T01:38:11","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=87209"},"modified":"2024-01-23T09:38:11","modified_gmt":"2024-01-23T01:38:11","slug":"linux-network-monitor","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-network-monitor.html","title":{"rendered":"3\u4e2a \u4f18\u79c0Linux \u7f51\u7edc\u76d1\u89c6\u5668\uff01"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4f60\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e09\u4e2a Linux \u7f51\u7edc\u547d\u4ee4\uff0c\u4e86\u89e3\u6709\u5173\u4f60\u7f51\u7edc\u8fde\u63a5\u7684\u5927\u91cf\u4fe1\u606f\u3002iftop \u901a\u8fc7\u8fdb\u7a0b\u53f7\u8ddf\u8e2a\u7f51\u7edc\u8fde\u63a5\uff0cNethogs \u53ef\u4ee5\u5feb\u901f\u663e\u793a\u54ea\u4e2a\u5728\u5360\u7528\u4f60\u7684\u5e26\u5bbd\uff0c\u800c vnstat \u4f5c\u4e3a\u4e00\u4e2a\u5f88\u597d\u7684\u8f7b\u91cf\u7ea7\u5b88\u62a4\u8fdb\u7a0b\u8fd0\u884c\uff0c\u53ef\u4ee5\u968f\u65f6\u968f\u5730\u8bb0\u5f55\u4f60\u7684\u4f7f\u7528\u60c5\u51b5\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
iftop<\/strong><\/div>\n

iftop \u76d1\u542c\u4f60\u6307\u5b9a\u7684\u7f51\u7edc\u63a5\u53e3\uff0c\u5e76\u4ee5 top \u7684\u5f62\u5f0f\u5c55\u793a\u8fde\u63a5\u3002<\/p>\n

\u8fd9\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u5c0f\u5de5\u5177\uff0c\u7528\u4e8e\u5feb\u901f\u8bc6\u522b\u5360\u7528\u3001\u6d4b\u91cf\u901f\u5ea6\uff0c\u5e76\u4fdd\u6301\u7f51\u7edc\u6d41\u91cf\u7684\u603b\u4f53\u8fd0\u884c\u3002\u770b\u5230\u6211\u4eec\u4f7f\u7528\u4e86\u591a\u5c11\u5e26\u5bbd\u662f\u975e\u5e38\u4ee4\u4eba\u60ca\u8bb6\u7684\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u6211\u4eec\u8fd9\u4e9b\u8fd8\u8bb0\u5f97\u4f7f\u7528\u7535\u8bdd\u7ebf\u3001\u8c03\u5236\u89e3\u8c03\u5668\u3001\u8ba9\u4eba\u5c16\u53eb\u7684 Kbit \u901f\u5ea6\u548c\u771f\u5b9e\u7684\u5b9e\u65f6\u6ce2\u7279\u7387\u7684\u8001\u5e74\u4eba\u6765\u8bf4\u3002\u6211\u4eec\u5f88\u4e45\u4ee5\u524d\u5c31\u653e\u5f03\u4e86\u6ce2\u7279\u7387\uff0c\u8f6c\u800c\u4f7f\u7528\u6bd4\u7279\u7387\u3002\u6ce2\u7279\u7387\u6d4b\u91cf\u4fe1\u53f7\u53d8\u5316\uff0c\u6709\u65f6\u4e0e\u6bd4\u7279\u7387\u76f8\u540c\uff0c\u4f46\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u4e0d\u662f\u3002<\/p>\n

\u5982\u679c\u4f60\u53ea\u6709\u4e00\u4e2a\u7f51\u7edc\u63a5\u53e3\uff0c\u53ef\u4ee5\u4e0d\u5e26\u9009\u9879\u8fd0\u884c iftop\u3002iftop \u9700\u8981 root \u6743\u9650\uff1a<\/p>\n

$ sudo iftop<\/pre>\n

\u5f53\u4f60\u6709\u591a\u4e2a\u63a5\u53e3\u65f6\uff0c\u6307\u5b9a\u8981\u76d1\u63a7\u7684\u63a5\u53e3\uff1a<\/p>\n

$ sudo iftop -i wlan0<\/pre>\n

\u5c31\u50cf top \u4e00\u6837\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u66f4\u6539\u663e\u793a\u9009\u9879\u3002<\/p>\n