5 Great Commands to Monitor Network Bandwidth on Linux Server
Linux network traffic monitoring is one of the main parts of Linux troubleshooting. And can be done by many network monitoring utilities.
In this article we will discover 5 great console Linux commands to monitor network bandwidth for various scenarios.
IPTraf
IPTraf is one of my favorite Linux network bandwidth monitoring tool. It shows:
- Total, IP, TCP, UDP, ICMP, and non-IP byte counts
- TCP source and destination addresses and ports
- TCP packet and byte counts
- TCP flag statuses
- UDP source and destination information
- ICMP type information
- OSPF source and destination information
- TCP and UDP service statistics
- Interface packet counts
- Interface IP checksum error counts
- Interface activity indicators
- LAN station statistics
If you have problem with using IPTraf please read article: IPTraf Doesn’t Show Interface in Ubuntu.
Install IPTraf on a CentOS / RHEL:
# yum install iptraf
Install IPTraf on a Ubuntu / Debian:
$ sudo apt-get install iptraf
or
$ sudo apt-get install iptraf-ng
Usage:
# yum iptraf
Speedometer
Speedometer network bandwidth monitor tool able graphically represent current network speed and can stored in a file.
Install Speedometer on Debian / Ubuntu:
$ sudo apt-get install speedometer
Speedometer usage example (replace eth0 with your network interface name):
$ sudo speedometer -r eth0 -t eth0
iftop
iftop is a free software command-line system monitor tool that produces a frequently updated list of network connections. By default, the connections are ordered by bandwidth usage, with only the “top” bandwidth consumers shown.
iftop Install on CentOS/Red Hat:
# yum install iftop
iftop Install on Debian / Ubuntu:
$ sudo apt-get install iftop
nload
nload is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in- and outgoing traffic using two graphs and provides additional info like the total amount of transferred data and min/max network usage. More information about nload usage – nload Linux man page.
Install nload on CentOS / RHEL:
# yum install epel-release # yum install nload
Install nload on Debian / Ubuntu:
$ sudo apt install nload
nload usage example:
In this example output you see my eno2 network interface traffic.
$ nload eno2
ifstat
And finally very simple tool- ifstat. ifstat – Report InterFace STATistics.
Install ifstat on CentOS / RHEL
ifstat CentOS installation can be done from RPMForge repository – install RPMforge Repository.
# yum install ifstat
Install ifstat on Debian / Ubuntu
$ apt-get install ifstat
Usage:
# ifstat -a