Linux下按程序查實時流量 network traffic


實然看到下載速度多達幾M/s,但實際上並沒有什么占用帶寬的進程.

相查看每個程序占用的網絡流量, 但系統自帶的 System Monitor 只能查看全局的流量, 不能具體看某個程序的......

 

key words: network traffic, process specific, nethogs

 

工具: nethogs (要用sudo運行)

Description : NetHogs is a small "net top" tool.        /* 像top 一樣的工具, 實時更新 */
            :
            : Instead of breaking the traffic down per protocol or per subnet, like
            : most such tools do, it groups bandwidth by process and does not rely    /* process specfific */
            : on a special kernel module to be loaded.
            :
            : So if there's suddenly a lot of network traffic, you can fire up        /* 用於發現占用帶寬的進程, 殺了它 */
            : NetHogs and immediately see which PID is causing this, and if it's
            : some kind of spinning process, kill it.

$ sudo dnf install nethogs -y

(效果圖, )

 

nethogs 的交互命令

m: 切換單位  KB/sec, KB, B, MB

r: 按接收排序 receive

s: 按發送排序 send

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM