To see the bandwidth usage per process on a Linux system, you can use the nethogs
tool. This tool is a command-line utility that shows the network traffic of individual processes in real-time.
To use nethogs
, you will need to install it on your Linux system. On a CentOS or Red Hat Enterprise Linux (RHEL) system, you can use yum
to install nethogs
as follows:
sudo yum install nethogs
On a Debian or Ubuntu system, you can use apt-get
to install nethogs
as follows:
sudo apt-get install nethogs
Once nethogs
is installed, you can use the following command to start monitoring the network traffic of individual processes:
sudo nethogs
This will open a screen showing a list of processes that are currently using the network, with each process shown as a separate row. The list will be updated in real-time, showing the total amount of data transferred and the current transfer rate for each process.
You can use the F5
key to sort the list by the amount of data transferred, and the F6
key to sort the list by the transfer rate. You can also use the F9
key to pause the display and the F10
key to exit nethogs
.