Operations 12 min read

Top 18 Linux Command-Line Tools to Monitor Network Bandwidth

This guide reviews a collection of Linux command-line utilities that let you track overall and per‑process network bandwidth, display inbound and outbound traffic separately, and generate real‑time or historical usage reports, helping administrators quickly identify bandwidth‑heavy processes.

Open Source Linux
Open Source Linux
Open Source Linux
Top 18 Linux Command-Line Tools to Monitor Network Bandwidth

This article introduces several Linux command-line tools for monitoring network usage. These utilities can display inbound and outbound traffic separately, report overall bandwidth, and even show per‑process bandwidth consumption.

Some tools read the /proc/net/dev file for statistics, while others capture packets via the pcap library to estimate traffic load.

Tools are grouped by functionality:

Overall bandwidth monitoring – nload, bmon, slurm, bwm-ng, cbm, speedometer, netload

Batch‑mode overall monitoring – vnstat, ifstat, dstat, collectl

Per‑socket connection bandwidth – iftop, iptraf, tcptrack, pktstat, netwatch, trafshow

Per‑process bandwidth – nethogs

1. nload

nload is a simple command-line tool that shows inbound and outbound traffic separately and can draw a chart. It has few options and is convenient for a quick overview of total bandwidth.

Installation: Available in default repositories of Fedora and Ubuntu; CentOS users need the EPEL repository.

2. iftop

iftop measures data transferred per socket connection using the pcap library. It cannot show process names/IDs but can filter traffic and report bandwidth for selected hosts.

Installation: Available in default repositories of Ubuntu/Debian/Fedora; CentOS users can obtain it from EPEL.

3. iptraf

iptraf is an interactive, colorful IP LAN monitoring tool that shows data volume for each connection and host.

Installation instructions are provided in the original source.

4. nethogs

nethogs displays bandwidth used by each process, sorting the list so the most bandwidth‑hungry processes appear at the top, and reports PID, user, and command path.

Installation: Available in default repositories of Ubuntu, Debian, and Fedora; CentOS users need EPEL.

5. bmon

bmon (Bandwidth Monitor) shows traffic load for all network interfaces, providing charts and packet‑level details.

Installation: Available in Ubuntu, Debian, Fedora; CentOS users must use Repoforge.

6. slurm

slurm is another network load monitor that displays device statistics and ASCII graphics, supporting three graph types activated with the c, s, and l keys. It offers only basic information.

Installation instructions are included.

7. tcptrack

tcptrack, like iftop, uses the pcap library to capture packets and calculate statistics per connection, supporting standard pcap filters.

Installation: Available in Ubuntu, Debian, Fedora; CentOS users need RepoForge.

8. vnstat

vnstat runs as a background daemon recording transferred data size, allowing generation of historical usage reports. Running it without options shows total data transferred since the daemon started.

Use the -l option for real‑time monitoring. vnstat focuses on historical reports rather than real‑time monitoring.

9. bwm-ng

bwm-ng (Bandwidth Monitor Next Generation) is a simple real‑time network load monitor that reports summary information and can display bar graphs in curses mode.

Installation: Available via EPEL on CentOS.

10. cbm (Color Bandwidth Meter)

cbm is a tiny tool that shows traffic size per network interface in real time without additional options.

11. speedometer

speedometer draws attractive graphs of inbound and outbound traffic for a selected interface.

12. pktstat

pktstat shows real‑time activity of all connections, reporting data rates, connection types (TCP/UDP), and HTTP request details when applicable.

13. netwatch

netwatch, part of the netdiag suite, displays connections between the local host and remote hosts along with data transfer rates.

14. trafshow

trafshow reports active connections, protocols, and data rates, supporting pcap‑style filters to monitor specific connections.

15. netload

netload provides a brief report of current traffic load and total bytes transferred since the program started; it is part of netdiag.

16. ifstat

ifstat displays network bandwidth in batch mode, outputting a format suitable for logging and analysis.

17. dstat

dstat, written in Python, monitors various system statistics and can report network bandwidth in batch mode or write data to CSV files.

18. collectl

collectl reports system statistics in a format similar to dstat, including CPU, memory, and network usage.

Conclusion: These command-line tools allow quick inspection of network bandwidth on Linux servers via SSH. Web‑based monitoring tools such as ntop, darkstat, and enterprise solutions like Nagios also provide comprehensive monitoring capabilities.

Original source: http://os.51cto.com/art/201404/435279.htm
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

linuxSystem AdministrationNetwork Monitoringcommand-line toolsbandwidth
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.