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.
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.
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.