Linux

Monitor Network Bandwidth Usage in Real Time With NetHogs

Monitor Network Bandwidth Usage in Real Time With NetHogs

Insight: Monitor Network Bandwidth Usage in Real Time With NetHogs

Nethogs is a tool to monitor network bandwidth usage in real time. It is similar to the Linux top command. In this tutorial post, we will show you t he various examples of NetHogs. NetHogs is used to analyze and monitor network traffic bandwidth used by each application or process.

Monitor Network Bandwidth Usage in Real Time With NetHogs

Before moving into the installation process of NetHogs, you need to install libncurses5-dev and libpcap0.8-dev.

For Ubuntu and Debian based operating systems:

sudo apt-get install libncurses5-dev libpcap0.8-dev

ForĀ  Fedora operating system:

sudo yum install ncurses ncurses-devel 
sudo yum install libpcap libcap-devel

NetHogs installation guide:

For Ubuntu and Debian based operating system:

sudo apt-get install nethogs

For RHEL, CentOS and Fedora:

yum install nethogs

Run the following command to run nethogs:

# sudo nethogs

NetHogs example:

Let’s start using NetHogs with the -d option as -d option refer to the refresh rate. Here the refresh rate is 3 and the interface we are monitoring is wlan0.

nethogs -d 3 wlan0

Run the following command to monitor specific interface:

sudo nethogs eth0

Run the following command to monitor two network interface at once:

sudo nethogs eth0 eht1

Run the following command to use nethogs in tracemode

nethogs -t wlan0

Run the following command to know the version of NetHogs tool that you are using in your Linux:

nethogs -V

This mode is not recommended to use but just for the knowledge we are sharing this command. Option -p helps to sniff in promiscious mode

nethogs -p wlan0

Well, this much for now. Let us know if you guys have any problem while running this command or want to add something in this blog post. Your comments and suggestions help us to improve our blog.

READ THIS ALSO  Best Free Books To Learn Linux : Get Your Copy