Check Network Usage Per Process in Linux

Introduction

Monitoring and troubleshooting network connections is a routine task of any network administrator. Slow network connections may lead to huge downtime. So as a network administrator, you should always keep an eye on your network to understand and resolve whatever is causing network slowness. There are plenty of free tools available to monitor the network usage per process.

This post will show you different tools for monitoring network usage per process in Linux.

iftop

iftop is a simple, lightweight, and command-line network bandwidth monitoring tool. It allows us to get a quick overview of network activities on a specific interface.

For Ubuntu and Debian based distributions, you can install it using the following command:

apt-get install iftop -y

For RHEL, Fedora, and CentOS distributions, you can install it using the following command:

yum install iftop -y

After the installation, open your terminal interface and run it using the following command:

iftop

This will display network usage bandwidth updates every 2, 10, and 40 seconds:

nload

nload is a powerful tool for monitoring network traffic and bandwidth usage in real-time. It monitors and displays inbound and outbound traffic via graph. It also shows the total amount of transferred data and min/max network usage.

For Ubuntu and Debian based distributions, you can install it using the following command:

apt-get install nload -y

For RHEL, Fedora, and CentOS distributions, you can install it using the following command:

yum install nload -y

After the installation, open your terminal interface and run it using the following command:

nload

You should see the following screen:

vnStat

vnStat is a full-featured and console-based network traffic monitoring tool. It is beneficial because it will keep a log of hourly, daily, and monthly network traffic. This will help you to analyze network traffic logs after the system reboot.

For Ubuntu and Debian based distributions, you can install it using the following command:

apt-get install vnstat -y

For RHEL, Fedora, and CentOS distributions, you can install it using the following command:

yum install epel-release -y
yum install vnstat -y

After the installation, you can launch it using the following command:

vnstat -l -i interface-name

This will start monitoring network bandwidth in real-time:

NetHogs

NetHogs is a text-based network traffic monitoring tool that displays bandwidth usage by each process or application running on a Linux system. It is very useful in the event of a sudden bandwidth spike. NetHogs shows the most intensive processes on top. It reports the PID, user, and the path of the program.

For Ubuntu and Debian based distributions, you can install it using the following command:

apt-get install nethogs -y

For RHEL, Fedora and CentOS distributions, you can install it using the following command:

yum install epel-release -y
yum install nethogs -y

After the installation, run the NetHogs as shown below:

nethogs

You should see the following screen:

IPTraf

IPTraf is a powerful and ncurses-based command-line tool that can track both incoming and outgoing network traffic. It helps you track the network traffic data coming from potentially unlimited network devices. It supports both IPv4 and IPv6 connections and can monitor unlimited devices per network.

For Ubuntu and Debian based distributions, you can install it using the following command:

apt-get install iptraf -y

For RHEL, Fedora, and CentOS distributions, you can install it using the following command:

yum install epel-release -y
yum install iptraf -y

After the installation, open your terminal interface and launch it using the following command:

iptraf-ng

You should see the following screen:

bmon

bmon is an open-source monitoring and debugging tool to monitor bandwidth and capture networking-related statistics. It captures networking-related statistics and displays them visually in a human-friendly format.

For Ubuntu and Debian based distributions, you can install it using the following command:

apt-get install bmon -y

For RHEL, Fedora, and CentOS distributions, you can install it using the following command:

yum install epel-release -y
yum install bmon -y

After the installation, you can launch it using the following command:

bmon

This will start monitoring your network bandwidth usage:

Conclusion

I showed you the best network bandwidth monitoring tools for Linux in the above guide. I hope this will help you pick the best network usage tracking utility for your server.


Was this page helpful?

Thank you for helping us improve!