Per-Process Network Monitoring in Linux

Have you ever been on a network connection with limited bandwidth and wondered what process was eating your bandwidth and preventing you from getting your work done? In Linux there is an extremely useful CLI program called Nethogs that shows your network usage by process so you can easily figure out where all of that bandwidth is going.

Installing is easy via your package manager. RH/CentOS:

$ yum install nethogs

or Debian-based:

$ sudo apt install nethogs

Or the package manager for your distribution.

To run it, just type:

$ sudo nethogs

You may or may not need root privileges to execute it depending on your distro, so sudo may or may not be necessary.

You should see something like this:

Nethogs network monitor

You can also monitor one or more network interfaces by specifying them on the command line:

$ sudo nethogs eth0

or

$ sudo nethogs eth0 wlo1

Nethogs has a series of useful command line options and interactive controls, check the manual.

$ man nethogs

Nethogs Manual