- 16 Useful Bandwidth Monitoring Tools to Analyze Network Usage in Linux
- ManageEngine Netflow Analyzer
- 1. vnStat – A Network Traffic Monitor
- Install VnStat in Linux
- 2. iftop – Displays Bandwidth Usage
- Install iftop in Linux
- 3. nload – Displays Network Usage
- Install nload in Linux
- 4. NetHogs – Monitor Network Traffic Bandwidth
- Install NetHogs in Linux
- 5. bmon – Bandwidth Monitor and Rate Estimator
- Install Bmon in Linux
- 6. Darkstat – Captures Network Traffic
- Install Darkstat in Linux
- 7. IPTraf – An IP Network Monitor
- Install IPTraf in Linux
- 8. CBM – (Color Bandwidth Meter)
- Install Color Bandwidth Meter in Linux
- 9. Iperf/Iperf3 – Network Bandwidth Measurement Tool
- Install Iperf3 in Linux
- 10. Netperf – Network Bandwidth Testing
- Install Netperf in Linux
- 11. SARG – Squid Analysis Report Generator
- 12. Monitorix – System and Network Monitoring Tool
- Install Monitorix in Linux
- 13. Cacti – Network Monitoring and Graphing Tool
- 14. Observium – Network Monitoring Platform
- 15. Zabbix – Application and Network Monitoring Tool
- 16. Nagios – Monitors Systems, Networks, and Infrastructure
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- 18 Commands to Monitor Network Bandwidth on Linux server
- Network monitoring on Linux
- 1. Nload
- 2. iftop
- 3. iptraf
- 4. nethogs
- 5. bmon
- 6. slurm
- 7. tcptrack
- 8. Vnstat
- 9. bwm-ng
- 10. cbm — Color Bandwidth Meter
- 11. speedometer
- 12. Pktstat
- 13. Netwatch
- 14. Trafshow
- 15. Netload
- 16. ifstat
- 17. dstat
- 18. collectl
- Summary
- 88 thoughts on “ 18 Commands to Monitor Network Bandwidth on Linux server ”
16 Useful Bandwidth Monitoring Tools to Analyze Network Usage in Linux
Are you having problems monitoring your Linux network bandwidth usage? Do you need help? It’s important that you are able to visualize what is happening in your network in order to understand and resolve whatever is causing network slowness or simply to keep an eye on your network.
In this article, we will review 16 useful bandwidth monitoring tools to analyze network usage on a Linux system.
If you are looking to manage, troubleshoot or debug your Network, then read our article – 22 Linux Networking Commands for Sysadmins
The tools listed below are all open source and can help you to answer questions such as “why is the network so slow today?”. This article includes a mix of small tools for monitoring bandwidth on a single Linux machine and complete monitoring solutions capable of handling a few number of hosts on a LAN (Local Area Network) to multiple hosts even on a WAN (Wide Area Network).
ManageEngine Netflow Analyzer
ManageEngine NetFlow Analyzer is a flow-based bandwidth monitoring solution that offers multi-vendor support. It monitors your network, analyzes traffic patterns, and detects and diagnoses bandwidth hogs.
You can track the traffic patterns in your network over any period of time, and drill down further into the device, interface, application, and user-level details. With its traffic shaping abilities, NetFlow Analyzer helps you identify network anomalies in real-time and troubleshoot them before they affect your end-users.
With its customizable reports, NetFlow Analyzer also helps you predict and plan your bandwidth requirements. You can create, schedule, and generate comprehensive bandwidth analysis reports in just a few clicks.
ManageEngine Netflow Analyzer
1. vnStat – A Network Traffic Monitor
VnStat is a fully-featured, command line-based program to monitor Linux network traffic and bandwidth utilization in real-time, on Linux and BSD systems.
Vnstat Network Traffic Monitor Tool
One advantage it has over a similar tool is that it logs network traffic and bandwidth usage statistics for later analysis – this is its default behavior. You can actually view these logs even after the system reboots.
Install VnStat in Linux
2. iftop – Displays Bandwidth Usage
iftop is a simple, easy-to-use, real-time top-like command line-based network bandwidth monitoring tool, used to get a quick overview of network activities on an interface. It displays network usage bandwidth updates every 2, 10, and 40 seconds on average.
Iftop Display Bandwidth Usage
Install iftop in Linux
3. nload – Displays Network Usage
nload is another simple, easy-to-use command-line tool for monitoring network traffic and bandwidth usage in real-time. It uses graphs to help you monitor inbound and outbound traffic. In addition, it also displays information such as the total amount of transferred data and min/max network usage.
nload – Monitor Network Usage
Install nload in Linux
4. NetHogs – Monitor Network Traffic Bandwidth
NetHogs is a tiny top-like, text-based tool to monitor real-time network traffic bandwidth usage by each process or application running on a Linux system. It simply offers real-time statistics of your network bandwidth usage on a per-process basis.
NetHogs – Monitor Network Usage Per User
Install NetHogs in Linux
5. bmon – Bandwidth Monitor and Rate Estimator
bmon is also a straightforward command-line tool for monitoring network bandwidth utilization and a rate estimator, in Linux. It captures network statistics and visualizes them in a human-friendly format so that you can keep an eye on your system.
Bmon – Bandwidth Monitor and Rate Estimator
Install Bmon in Linux
6. Darkstat – Captures Network Traffic
Darkstat is a small, simple, cross-platform, real-time, efficient web-based network traffic analyzer. It is a network statistics monitoring tool that works by capturing network traffic, computer usage statistics, and serves the reports over HTTP in a graphical format. You can also use it via the command line to get the same results.
Darkstat – Captures Network Traffic
Install Darkstat in Linux
7. IPTraf – An IP Network Monitor
IPTraf is an easy-to-use, ncurses-based and configurable tool for monitoring incoming and outgoing network traffic passing through an interface. It is useful for IP traffic monitoring, and viewing general interface statistics, detailed interface statistics and so much more.
IPTraf – Network Statistics Utility
Install IPTraf in Linux
8. CBM – (Color Bandwidth Meter)
CBM is a tiny command-line utility for displaying current network traffic on all connected devices in colored output in Ubuntu Linux and its derivatives such as Linux Mint, Lubuntu, and many others. It shows each connected network interface, bytes received, bytes transmitted, and total bytes, allowing you to monitor network bandwidth.
CBM – Monitor Network LAN Usage
Install Color Bandwidth Meter in Linux
9. Iperf/Iperf3 – Network Bandwidth Measurement Tool
Iperf/Iperf3 is a powerful tool for measuring network throughput over protocols such as TCP, UDP, and SCTP. It is primarily built to help in tuning TCP connections over a particular path, thus useful for testing and monitoring the maximum achievable bandwidth on IP networks (supports both IPv4 and IPv6).
It requires a server and a client to perform tests (which reports the bandwidth, loss, and other useful network performance parameters).
Iperf3 – Network Performance and Tuning
Install Iperf3 in Linux
10. Netperf – Network Bandwidth Testing
Netperf is similar to iperf, for testing network performance. It can help in monitoring network bandwidth in Linux by measuring data transfer using either TCP, UDP. It also supports measurements via Berkeley Sockets interface, DLPI, Unix Domain Sockets, and so many other interfaces. You need a server and a client to run tests.
Netperf – Network Bandwidth Testing
Install Netperf in Linux
11. SARG – Squid Analysis Report Generator
SARG is a squid log files analyzer and internet bandwidth monitoring tool. It produces useful HTML reports with information including but not limited to IP addresses, and total bandwidth usage. It is a handy tool for monitoring internet bandwidth utilization by individual machines on a single network.
Sarg – Squid Network Analysis Report Generator
For installation instruction and usage, check out our article – How to Install SARG to Monitor Squid Internet Bandwidth Usage.
12. Monitorix – System and Network Monitoring Tool
Monitorix is a lightweight system resources and network monitoring application, designed for small Linux/Unix servers and also comes with amazing support for embedded devices.
It helps you monitor network traffic and usage statistics from an unlimited number of network devices. It supports IPv4 and IPv6 connections include packet traffic and traffic error graphs and supports up to 9 discs per network interface.
Monitorix – System and Network Monitoring Tool
Install Monitorix in Linux
13. Cacti – Network Monitoring and Graphing Tool
Cacti is a fully functional, web-based network graphing PHP application with an intuitive, easy-to-use interface. It uses MySQL database for storing data collected network performance data, used to produce customized graphing. It is a frontend to RRDTool, useful for monitoring small to complex networks with thousands of devices.
Cacti – Network Monitoring and Graphing Tool
For installation instruction and usage, check out our article – Install Cacti (Network Monitoring) on Linux.
14. Observium – Network Monitoring Platform
Observium is a fully-featured network monitoring platform with an elegant and powerful, robust yet simple and intuitive interface. It supports a number of platforms including, Linux, Windows, FreeBSD, Cisco, HP, Dell, and many others, and includes autodetection of devices. It helps users to gather network metrics and offers intuitive graphing of device metrics from collected performance data.
Observium – Network Monitoring Platform
15. Zabbix – Application and Network Monitoring Tool
Zabbix is a feature-rich, commonly used network monitoring platform, designed in a server-client model, to monitor networks, servers, and applications in real-time. It collects different types of data that are used for a visual representation of network performance or load metrics of the monitored devices.
It is capable of working with well-known networking protocols such as HTTP, FTP, SMTP, IMAP, and many more, without the need to install additional software on the monitored devices.
Zabbix – Monitoring Solution for Linux
16. Nagios – Monitors Systems, Networks, and Infrastructure
Nagios is a robust, powerful, feature-rich, and widely used monitoring software. It allows you to monitor local and remote network devices and their services from a single window.
It offers bandwidth monitoring in network devices such as switches and Routers via SNMP thus enabling you to easily find out over-utilized ports, and pinpoint possible network abusers.
In addition, Nagios also helps you to keep an eye on per-port bandwidth utilization and errors and supports fast detection of network outages and protocol failures.
Nagios – IT Infrastructure Monitoring Tool
Summary
In this article, we have reviewed a number of useful network bandwidth and system monitoring tools for Linux. If we’ve missed including any monitoring tool in the list, do share with us in the comment form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
18 Commands to Monitor Network Bandwidth on Linux server
Network monitoring on Linux
This post mentions some linux command line tools that can be used to monitor the network usage.
These tools monitor the traffic flowing through network interfaces and measure the speed at which data is currently being transferred. Incoming and outgoing traffic is shown separately.
Some of the commands, show the bandwidth used by individual processes. This makes it easy to detect a process that is overusing network bandwidth.
The tools have different mechanisms of generating the traffic report.
Some of the tools like nload read the «/proc/net/dev» file to get traffic stats, whereas some tools use the pcap library to capture all packets and then calculate the total size to estimate the traffic load.
Here is a list of the commands, sorted by their features.
Now lets take a look at each of the commands and how to use them to monitor network usage:
1. Nload
Nload is a commandline tool that allows users to monitor the incoming and outgoing traffic separately.
It also draws out a graph to indicate the same, the scale of which can be adjusted. Easy and simple to use, and does not support many options.
So if you just need to take a quick look at the total bandwidth usage without details of individual processes, then nload will be handy.
Installing Nload — Fedora and Ubuntu have got it in the default repos. CentOS users need to get nload from Epel repositories.
2. iftop
Iftop measures the data flowing through individual socket connections, and it works in a manner that is different from Nload.
Iftop uses the pcap library to capture the packets moving in and out of the network adapter, and then sums up the size and count to find the total bandwidth under use.
Although iftop reports the bandwidth used by individual connections, it cannot report the process name/id involved in the particular socket connection.
But being based on the pcap library, iftop is able to filter the traffic and report bandwidth usage over selected host connections as specified by the filter.
The n option prevents iftop from resolving ip addresses to hostname, which causes additional network traffic of its own.
Install iftop — Ubuntu/Debian/Fedora users get it from default repos. CentOS users get it from Epel.
3. iptraf
Iptraf is an interactive and colorful IP Lan monitor. It shows individual connections and the amount of data flowing between the hosts. Here is a screenshot
4. nethogs
Nethogs is a small ‘net top’ tool that shows the bandwidth used by individual processes and sorts the list putting the most intensive processes on top.
In the event of a sudden bandwidth spike, quickly open nethogs and find the process responsible. Nethogs reports the PID, user and the path of the program.
Install Nethogs — Ubuntu, Debian, Fedora users get from default repos. CentOS users need Epel
5. bmon
Bmon (Bandwidth Monitor) is a tool similar to nload that shows the traffic load over all the network interfaces on the system. The output also consists of a graph and a section with packet level details.
Install Bmon — Ubuntu, Debian and Fedora users can install from default repos. CentOS users need to setup repoforge, since its not available in Epel.
Bmon supports many options and is capable of producing reports in html format. Check the man page for more information
6. slurm
Slurm is ‘yet’ another network load monitor that shows device statistics along with an ascii graph. It supports 3 different styles of graphs each of which can be activated using the c, s and l keys. Simple in features, slurm does not display any further details about the network load.
7. tcptrack
Tcptrack is similar to iftop, and uses the pcap library to capture packets and calculate various statistics like the bandwidth used in each connection.
It also supports the standard pcap filters that can be used to monitor specific connections.
Install tcptrack — Ubuntu, Debian and Fedora have it in default repos. CentOS users need to get it from RepoForge as it is not available in Epel either.
8. Vnstat
Vnstat is bit different from most of the other tools. It actually runs a background service/daemon and keeps recording the size of data transfer all the time.
Next it can be used to generate a report of the history of network usage.
Running vnstat without any options would simply show the total amount of data transfer that took place since the date the daemon is running.
To monitor the bandwidth usage in realtime, use the ‘-l’ option (live mode). It would then show the total bandwidth used by incoming and outgoing data, but in a very precise manner without any internal details about host connections or processes.
Vnstat is more like a tool to get historic reports of how much bandwidth is used everyday or over the past month. It is not strictly a tool for monitoring the network in real time.
Vnstat supports many options, details about which can be found in the man page.
9. bwm-ng
Bwm-ng (Bandwidth Monitor Next Generation) is another very simple real time network load monitor that reports a summary of the speed at which data is being transferred in and out of all available network interfaces on the system.
If the console size is sufficiently large, bwm-ng can also draw bar graphs for the traffic using the curses2 output mode.
Install Bwm-NG — On CentOS bwm-ng can be installed from Epel.
10. cbm — Color Bandwidth Meter
A tiny little simple bandwidth monitor that displays the traffic volume through network interfaces. No further options, just the traffic stats are display and updated in realtime.
11. speedometer
Another small and simple tool that just draws out good looking graphs of incoming and outgoing traffic through a given interface.
12. Pktstat
Pktstat displays all the active connections in real time, and the speed at which data is being transferred through them.
It also displays the type of the connection, i.e. tcp or udp and also details about http requests if involved.
13. Netwatch
Netwatch is part of the netdiag collection of tools, and it too displays the connections between local host and other remote hosts, and the speed at which data is transferring on each connection.
14. Trafshow
Like netwatch and pktstat, trafshow reports the current active connections, their protocol and the data transfer speed on each connection. It can filter out connections using pcap type filters.
Monitor only tcp connections
15. Netload
The netload command just displays a small report on the current traffic load, and the total number of bytes transferred since the program start. No more features are there. Its part of the netdiag.
16. ifstat
The ifstat reports the network bandwidth in a batch style mode. The output is in a format that is easy to log and parse using other programs or utilities.
Install ifstat — Ubuntu, Debian and Fedora users have it in the default repos. CentOS users need to get it from Repoforge, since its not there in Epel.
17. dstat
Dstat is a versatile tool (written in python) that can monitor different system statistics and report them in a batch style mode or log the data to a csv or similar file. This example shows how to use dstat to report network bandwidth
18. collectl
Collectl reports system statistics in a style that is similar to dstat, and like dstat it is gathers statistics about various different system resources like cpu, memory, network etc.
Over here is a simple example of how to use it to report network usage/bandwidth.
Summary
Those were a few handy commands to quickly check the network bandwidth on your linux server. However these need the user to login to the remote server over ssh.
Alternatively web based monitoring tools can also be used for the same task.
Ntop and Darkstat are some of the basic web based network monitoring tools available for Linux.
Beyond these lie the enterprise level monitoring tools like Nagios that provide a host of features to not just monitor a server but entire infrastructure.
A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected] .
88 thoughts on “ 18 Commands to Monitor Network Bandwidth on Linux server ”
Amazing Article, Really useful information to all So, I hope you will share more information to be check and share here.thanks for sharing.
Thanks for sharing this amazing informative article. this is best for cs students mainly linux student to know about these commands.
Wow, so much loads of usefulness! Thank you for this! Lots of tools I never heard and surprise they are there by default on reposity, just apt install away!!
Based on nethogs, there’s a Qt software providing charts per application:
https://slist.lilotux.net/linux/nethogs-qt/index_en.html
thanks for mentioning.
Very informative and useful article. We can see all the commands at one shot.
Thanks for sharing
it is really a great article and helping to learn about Linux network.
Keep sharing such great knowledge
These are perfect 100% working commands. That is quite amazing. Thanks for such a useful article…
Great article.It’s a big collection for monitor, is any app can track daily bandwidth ?
Thanks! Nethogs is perfect for me as it shows usage per process: current bandwith and total used, great!
Thanks, it is saving a lot of time
Very informative and useful article.
Thanks for sharing
that was really useful
thanks
Thanks for sharing informative article I have been looking for these command with step by step guide you did a great job and i found a solution that I am looking for keep up the good work.
You are right.
Actually i was too looking about this commands.
At least i found these all here.
Thanks.
This commands its very helpful for me i want to i want to know how to create a server 2012 r2 in home
20+ year vet here. pure gold .. many of these are new to me.
excellent article
glad that you liked it.
thanks for the comment.
Very good and useful compilation.
Good job and thanks!!
Now an article about _graphical_ monitor network applications would be even better 🙂
This a gem for commands.
Thanks 🙂
Thank you for this article, I didn’t know about these tools.
Thank you, very good article, a treasure trove 🙂
In our company we are several clients which are connected to an Ubuntu Server. Sometimes there is problem in entire network of company and we have heavy load on server. We try to find which client causes this problem.
As part of solution should be monitored entire network 24 hour per day? And if yes, which network monitoring tool helps us to find bad client and how to log it to analyze later?
How can we get complete status of each client and its transaction with our server? For example, a client named A have connection with server, how can we see how many bandwidths is used by this client?
Use a proper router like opnsense. It can monitor per host traffic and even put quotas on certain hosts or otherwise profile them to use less bandwidth.
Thank you. We can see all the commands at one shot.
Great article. Thanks for all you have done here. Very good examples and a good read. Exceptionally useful information.
Источник