6
1
On Linux (preferably in the command line), how can I view network usage per process?
I'm not interested in total bandwith usage, but rather in how it's split among processes.
6
1
On Linux (preferably in the command line), how can I view network usage per process?
I'm not interested in total bandwith usage, but rather in how it's split among processes.
5
sudo apt-get install nethogs
sudo nethogs
From the man page:
NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups band‐width by process - and does not rely 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' some kind of spinning process, kill it.
2nethogs might work for you – Der Hochstapler – 2016-06-20T12:44:33.167
Sorry, man. I missed the comment. @Oliver should have it.... – Diagon – 2016-06-20T16:01:03.307
@It don't matter. You made it an answer. Meaningless score points go to you. :) (The accepted checkmark remains to be Oliver's for the taking, should he choose to compete with you ;)) – PSkocik – 2016-06-20T16:06:30.830
Ok. Though frustratingly enough, they do have significance until you get to 200 points, because they block us from commenting! (200 points will put you over 100 on all the SE sites, which solves that irritation.) – Diagon – 2016-06-20T16:09:32.937
related https://stackoverflow.com/questions/368002/network-usage-top-htop-on-linux
– Ciro Santilli 新疆改造中心法轮功六四事件 – 2017-10-29T02:05:24.723