Introduction
Monitoring network bandwidth and performance is crucial for preventing malfunctions and ensuring network stability. Overall usage reports help determine bandwidth requirements, while real-time and more detailed process-level reports help identify high bandwidth usage sources and alert users about usage spikes or unusual activity.
There are many different tools for monitoring network traffic on a Linux server, allowing users to pinpoint the cause of a slow network and quickly fix any network issues.
This guide lists the best CLI and GUI Linux network monitoring tools.
Prerequisites
- Access to a user account with
sudo
or root privileges. - For CentOS and RHEL Linux, the EPEL (Extra Packages for Enterprise Linux) repository.
- A package manager tool (yum, dnf, or apt).
- Access to a terminal window (Ctrl–Alt–T).
Command-Line Linux Network Monitoring Tools
Command-line network monitoring tools are an excellent choice for Linux servers without a graphical interface as they provide the metrics within the command line. The tools usually output a quick overview of network bandwidth metrics.
However, for a detailed graph of network usage over a period of time, GUI tools may be a better option.
The sections below list the best CLI-based Linux network monitoring tool.
Note: CentOS, Rocky Linux, and other RHEL-based systems require the EPEL repository to install the tools listed in the article. Install the EPEL repo by running the following commands:
sudo yum -y install epel-release
yum repolist
iftop – Display Bandwidth Usage
The iftop
command is similar to the top
command for monitoring CPU usage. iftop
provides a real-time display of bandwidth usage by individual connection. It also generates an overview of the amount of bandwidth being used.
The utility is ideal for checking network speed as well. One limitation of iftop
is that it does not track traffic by process ID (PID).
To install iftop
, run:
RHEL / CentOS / Rocky Linux
yum install iftop -y
Debian / Ubuntu
sudo apt install iftop
nload – Displays Network Usage
nload
is a command-line utility for monitoring network traffic. This tool only reports inbound and outbound traffic. The output includes a graph, which is helpful for a quick overview of network traffic.
However, nload
has a disadvantage as it does not display traffic by PID or socket.
To install nload
, run:
RHEL / CentOS / Rocky Linux
yum -y install nload
Debian / Ubuntu
sudo apt install nload
NetHogs – Monitor Network Traffic Bandwidth
NetHogs
is another tool similar to the top command. The utility generates real-time reports of network usage. NetHogs’ key advantage is that it sorts the data by each process/application and usage, making it a great utility for tracking bandwidth spikes (when launched on time).
To install NetHogs
, run:
RHEL / CentOS / Rocky Linux
yum -y install nethogs
Debian / Ubuntu
sudo apt install nethogs
bmon – Bandwidth Monitor and Rate Estimator
bmon
monitors bandwidth utilization, along with keeping a running rate estimate. It provides usage for each device individually, allowing users to track bandwidth across multiple network adapters.
bmon
captures network statistics and provides a human-friendly output. Another positive feature is that the output includes a graph, providing bandwidth usage at a glance.
To install bmon
, run:
RHEL / CentOS / Rocky Linux
yum -y install bmon
Debian / Ubuntu
sudo apt install bmon
vnStat – Network Traffic Monitor
vnStat
works by running a daemon that captures and records bandwidth data. It reads data from the kernel to stay light on resource usage. The tool can run in real-time by specifying the -l
option. The key feature of vnStat
are persistent records – as the daemon runs, it collects and stores bandwidth usage logs.
The vnstat
command can be used to display usage statistics, and it is best suited for statistical reporting. To install vnStat
, run:
RHEL / CentOS / Rocky Linux
yum -y install vnstat
Debian / Ubuntu
sudo apt install vnstat
iPerf/iPerf3 – Network Bandwidth Measurement Tool
iPerf
is a tool that monitors network bandwidth by protocol, such as TCP, UDP, and SCTP. This tool works best for tweaking and maximizing network performance for a particular protocol.
One iPerf
‘s limitation is that it requires both a server and a client for testing, which rules it out as a candidate if you only need to measure network speeds.
Note: nload
and iftop
are excellent command line tools for testing network speed. To learn more about other options, check out our article How To Test Network Speed In Linux Via CLI.
To install iPerf
, run:
RHEL / CentOS / Rocky Linux
yum -y install iperf3
Debian / Ubuntu
sudo apt install iperf3
In the example above, iPerf3
is running in server mode and listening for connections.
Netperf – Network Bandwidth Testing
Netperf
is similar to iPerf
in terms of testing network performance. The tool helps monitor network bandwidth using Unix domain sockets, TCP, SCTP, DLPI, and UDP via BSD Sockets.
Like iPerf
, Netperf
also requires a server and a client for testing. Among its key features are the numerous predefined tests for measuring performance or data transfer speeds.
To install Netperf
, run:
RHEL / CentOS / Rocky Linux
sudo dnf install netperf
Debian / Ubuntu
sudo apt install netperf
IPTraf – An IP Network Monitor
IPtraf
is a Ncurses-based, user-friendly network monitoring tool. The utility is suitable for tracking inbound and outbound network traffic, monitoring IP traffic, and obtaining general interface network information and detailed interface statistics.
Its key advantages are the numerous configuration options and an intuitive interface, making it easy to obtain the necessary network information.
To install IPTraf
, run:
RHEL / CentOS / Rocky Linux
sudo dnf install iptraf
Debian / Ubuntu
sudo apt install iptraf
cbm – Color Bandwidth Meter
The Color Bandwidth Meter (cbm
) is a small command-line utility that displays current network traffic on all devices connected to the network. The curses-based output is displayed in colors and shows each network interface, bytes received, sent, and total bytes.
To install cbm
, run:
RHEL / CentOS / Rocky Linux
sudo dnf install cbm
Debian / Ubuntu
sudo apt install cbm
Linux Network Monitoring GUI Tools
The following tools are GUI-based, offering a more robust monitoring suite than the CLI-based ones. The output usually includes graphs and visually organized statistics, making it easy to monitor all network bandwidth and performance at a glance.
Nagios Core – Monitors Systems, Networks and Infrastructure
Nagios Core is an open-source, feature-rich, and free bandwidth monitoring app, which also offers a paid version with official support. The tool’s interface is web-based and can monitor multiple services, such as HTTP, POP3, and SMTP.
Another great feature are the automatic alerts in case of issues, allowing users to resolve them as soon as they arise. Nagios also provides bandwidth monitoring in network devices, such as switches and routers, via SNMP, which facilitates finding possible bandwidth hogs.
Additionally, Nagios helps monitor bandwidth utilization per port and quickly detects network outages and protocol failures.
Note: Learn the differences between IMAP, POP3 and SMTP.
Zabbix – Application and Network Monitoring Tool
Zabbix is a free, open-source, feature-rich network monitoring application designed in a server-client model. Its web-based interface provides real-time network, server, device, and app monitoring.
The data logs it generates visually represent network performance or device load metrics and can be used to track and improve network performance. The app is great for both small and large commercial apps.
Zabbix supports most standard network protocols, such as HTTP, FTP, SMTP, IMAP, and others, without installing additional software on the monitored devices.
Cacti – Network Monitoring and Graphing Tool
Cacti is a web-based network monitoring tool written in PHP, featuring an intuitive and user-friendly interface. Its key advantage is comprehensive data collection and reports on network bandwidth and other metrics, such as user access and permissions.
Cacti collects data using scripts and outputs clear charts and graphs, allowing users to pinpoint any bandwidth usage spikes or network issues quickly. All data is stored using MySQL databases and used to produce custom graphs.
Site 24×7 – NetFlow Analyzer
Site 24×7’s NetFlow Analyzer is a cloud-based network monitoring utility that provides a wide range of functions for multiple devices in a network. It implements various technologies, such as NetFlow, sFlow, and J-Flow, allowing users to collect stats for different apps and devices.
The tool can monitor source and destination devices, their interfaces, and traffic flow. Users can configure threshold values for all monitored metrics and receive alerts when thresholds are exceeded.
NetFlow is not free, although it does offer a fully functional 30-day free trial period.
ManageEngine – NetFlow Analyzer
ManageEngine’s NetFlow Analyzer is a flow-based network monitoring tool that provides traffic pattern analytics and bandwidth spike detection. Users can pinpoint network issues by analyzing traffic patterns and obtain details on devices, interfaces, or apps.
The Analyzer provides real-time monitoring and troubleshooting, facilitating the discovery of network issues as soon as they occur. The utility also features customizable reports, which are available with a few clicks. The supported flow technologies are NetFlow, sFlow, IPFIX, Netstream, J-Flow, and AppFlow.
Regarding pricing, the app comes in two flavors – Professional and Enterprise. The main difference is in the number of flows per second and the number of networks supported. There is also a free 30-day trial for both versions. The Free version is limited to monitoring up to two interfaces.
SolarWinds – NetFlow Traffic Analyzer
The NetFlow Traffic Analyzer by SolarWinds is a network monitoring utility featuring a wide range of monitoring functions and a scalable number of nodes in the network. The utility offers interactive and visualized data displays with color-coded and searchable visual data, making it intuitive and user-friendly.
In addition to network monitoring, NTA allows users to monitor bandwidth and get alerts when traffic issues arise or a device is malfunctioning. One of its key features is monitoring port 0 for unusual traffic, preventing attacks, and securing the network.
The app comes with a fully functional 30-day free trial period, after which the users can choose between two license types – Subscription, starting from €875, or Perpetual, starting from €1585.
Darkstat – Captures Network Traffic
Darkstat is a lightweight and simple web-based network monitoring utility that can also run in the command line. The tool works in real-time, analyzing traffic and displaying network statistics in a graphical format over HTTP or in the command prompt.
Darkstat captures the system’s traffic flow information and computer usage statistics and outputs the collected information in a graphical report. The visual representation makes it easy to notice any unusual usage spikes.
It supports IPv4 and IPv6 and supports asynchronous reverse DNS resolution. The utility is free of cost.
SARG – Squid Analysis Report Generator
SARG is an open-source network and bandwidth monitoring app that analyses squid log files and produces detailed HTML reports on network usage. Reports include IP addresses, total bandwidth usage, bytes sent and received, visited sites, and more.
The tool is especially useful for monitoring network usage on individual machines connected to the same network. SARG generates the reports automatically, but it requires that the squid proxy server writes the log files for it to read from.
Squid is a caching proxy that supports HTTP, HTTPS, FTP, and more. It optimizes the data flow between clients and server, and caches frequently used content to save bandwidth.
Monitorix – System and Network Monitoring Tool
Monitorix is a free, open-source Linux/Unix server monitoring tool for system resource and network monitoring. It also supports embedded devices aside from servers.
It supports IPv4 and IPv6 and allows users to monitor network traffic and bandwidth from all the devices on their network. The utility is lightweight and includes a built-in HTTP server for viewing the statistics and graphs. The graphs are color-coded for more straightforward analysis.
Aside from network stats, Monitorix can also monitor practically all system resources, including disk drive temperature, system load, kernel usage, CPU usage, ambient sensor stats, and much more.
Observium – Network Monitoring Platform
Observium is a network monitoring tool that supports Linux, Windows, FreeBSD, Cisco, and many other platforms and operating systems. It comes with a fully featured and intuitive interface and device autodetection. The app is primarily used with small servers.
It uses standard SNMP network monitoring to collect network metrics and then creates intuitive graphs for effortless network monitoring at a glance.
It comes in two flavors – Observium Community, which is completely free, and Observium Professional, which receives frequent updates and new features more often.
The Community version is recommended for personal servers, while the Professional version offers real-time updates, network activity notifications, and alerts.
EtherApe – Network Monitoring
EtherApe is a graphical network monitoring tool designed for Linux/Unix. It supports a wide variety of devices, including Ethernet, FDDI, Token Ring, ISDN, PPP, SLIP, and WLAN devices, but also several encapsulation formats.
The utility can act as a packet sniffer and bandwidth monitoring tool and display network activity using graphs. It obtains the data from a file or live from the network, allowing users to filter which traffic they want to see.
Each node in the graph is a specific host, while the links are connections to hosts. Everything is color-coded to represent different protocols and various types of traffic on the network.
EtherApe is completely free and open source.
Conclusion
This guide covered the top Linux system monitoring and network bandwidth tools used in the command line and as a GUI. Experiment and test a few options, and consider your needs and the software capabilities to find one that suits your business best.
Đăng ký liền tay Nhận Ngay Bài Mới
Subscribe ngay
Cám ơn bạn đã đăng ký !
Lỗi đăng ký !
Add Comment