Essential Linux Command‑Line Tools for Monitoring Network Bandwidth
This article introduces a collection of Linux command‑line utilities—such as nload, iftop, iptraf, nethogs, bmon, and many others—that can monitor overall and per‑process network bandwidth, explain their measurement methods, and provide installation instructions for major distributions.
The article presents a set of Linux command‑line tools for monitoring network usage, detailing how each tool measures traffic, what information it displays, and how to install it on common distributions.
nload
nload shows inbound and outbound traffic separately and can draw adjustable charts. It is simple to use with few options, making it suitable for quick total bandwidth checks.
Installation: Available in default repositories of Fedora and Ubuntu; CentOS users can obtain it from the EPEL repository.
iftop
iftop measures data transferred per socket connection using the pcap library to capture packets, summarizing packet sizes and counts. It cannot show process IDs but supports filtering and can suppress DNS lookups with the -n option.
Installation: Available in default repositories of Ubuntu/Debian/Fedora; CentOS users can install from EPEL.
iptraf
iptraf is an interactive, colorful LAN monitoring tool that displays traffic volume for each connection and host.
Installation instructions are provided via screenshots (typically from the distribution’s package manager).
nethogs
nethogs is a lightweight "net top" utility that lists bandwidth usage per process, sorting the most consuming processes at the top and showing PID, user, and command path.
Installation: Available in default repositories of Ubuntu, Debian, and Fedora; CentOS users can obtain it from EPEL.
bmon
bmon (Bandwidth Monitor) displays traffic load for all network interfaces with charts and detailed packet‑level information.
Installation: Installable from default repositories of Ubuntu, Debian, and Fedora; CentOS users need the Repoforge repository.
slurm
slurm provides device statistics and ASCII graphics with three display modes activated by the c, s, and l keys. It offers basic monitoring without detailed per‑connection data.
Installation: Available via default repositories on Ubuntu/Debian/Fedora; CentOS users must use Repoforge.
tcptrack
tcptrack, similar to iftop, captures packets with pcap, calculates per‑connection bandwidth, and supports standard pcap filters.
Installation: Included in default repositories of Ubuntu, Debian, and Fedora; CentOS users can obtain it from RepoForge.
vnstat
vnstat runs a background daemon that continuously records transmitted data, allowing historical reports of daily or monthly bandwidth usage. Running it without options shows total data since the daemon started.
Installation: Packages are available in standard repositories for most distributions; detailed options are documented in the manual page.
bwm-ng
bwm-ng (Bandwidth Monitor Next Generation) is a simple real‑time tool that reports summary information and can display bar graphs in curses mode on sufficiently large consoles.
Installation: Installable from EPEL on CentOS.
cbm (Color Bandwidth Meter)
cbm is a tiny utility that shows real‑time traffic statistics per network interface without additional options.
speedometer
speedometer draws attractive graphs of inbound and outbound traffic for a selected interface.
pktstat
pktstat shows active connections, their transfer speeds, connection types (TCP/UDP), and, for HTTP, detailed request information.
netwatch
netwatch, part of the netdiag suite, displays connections between the local host and remote hosts along with per‑connection traffic speeds.
trafshow
trafshow reports active connections, protocols, and transfer speeds, supporting pcap‑style filters; it can be limited to TCP connections.
netload
netload provides a brief report of current traffic load and total bytes transferred since the program started; it is part of the netdiag suite.
ifstat
ifstat outputs bandwidth statistics in batch mode, suitable for logging and further analysis.
dstat
dstat, written in Python, monitors various system statistics, can output in batch mode, and can write data to CSV files; it can report network bandwidth as shown in the example.
collectl
collectl reports system statistics in a format similar to dstat, covering CPU, memory, and network usage.
Conclusion: These command‑line tools enable quick inspection of network bandwidth on Linux servers via SSH. For web‑based monitoring, tools like ntop, darkstat, or enterprise solutions such as Nagios can be used.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
