Monitoring Network Usage in Linux

Network monitoring in Linux involves tracking and analyzing network traffic, bandwidth usage, and connection statistics to ensure optimal system performance. Unlike general system monitoring that focuses on CPU and memory, network monitoring specifically targets data flow across network interfaces and helps identify bottlenecks, suspicious activity, and resource-hungry applications.

Network Monitoring Tools

Linux provides several powerful command-line tools for network monitoring, each serving different purposes ?

  • nload ? Displays real-time network traffic statistics with visual graphs for interface monitoring.

  • Speedometer ? Shows network usage with customizable display formats and measurement units.

  • iftop ? Lists active network connections sorted by bandwidth usage in real-time.

  • netstat ? Displays network connections, routing tables, and interface statistics.

  • nethogs ? Monitors network usage by individual processes rather than system-wide traffic.

These tools can be used individually or in combination to gain comprehensive insights into network performance and troubleshoot specific connectivity issues.

nload Real-Time Traffic Monitor

nload displays live network statistics including inbound and outbound transfer rates, total data transferred, and visual graphs of traffic patterns. It provides an intuitive interface for monitoring network interface activity.

Basic Usage

To monitor a specific network interface, use the interface name as an argument ?

nload eth0

Navigate between interfaces using arrow keys and press q to exit. Common options include ?

  • -t ? Display usage in text format

  • -u k|m ? Change units to kibibytes or megabytes

  • -i interval ? Set refresh interval in seconds

  • -a ? Monitor all available interfaces

Examples

nload -u k -t eth0

This displays eth0 traffic in kibibytes using text format with 1-second refresh intervals.

nload -i 5 -m eth0

Updates statistics every 5 seconds and shows usage in megabytes.

nload --all

Monitors all network interfaces simultaneously with interface switching capability.

Speedometer Customizable Traffic Display

speedometer offers flexible display options for monitoring network transfer rates with various formatting choices and measurement units.

Basic Usage

speedometer -i eth0

Key options include ?

  • -i interface ? Specify network interface

  • -u m ? Display in megabytes

  • -r seconds ? Set refresh rate

  • -l ? Use bar graph format

Example

speedometer -i eth0 -u m -r 2 -l

This monitors eth0 with 2-second updates, megabyte units, and bar graph display.

nethogs Process-Level Network Monitor

nethogs uniquely displays network usage by individual processes, making it invaluable for identifying which applications consume the most bandwidth.

Basic Usage

nethogs eth0

The output shows each process with its network usage, including process name, PID, and bandwidth consumption.

Monitoring Multiple Interfaces

nethogs eth0 wlan0

This monitors both Ethernet and wireless interfaces simultaneously, displaying process-level usage for all specified interfaces.

Comparison of Tools

Tool Focus Display Type Key Feature
nload Interface traffic Real-time graphs Visual bandwidth monitoring
speedometer Transfer rates Customizable bars Flexible display options
nethogs Process usage Process list Per-application tracking

Conclusion

Network monitoring tools in Linux provide essential capabilities for tracking bandwidth usage, identifying network bottlenecks, and monitoring application-level traffic. Tools like nload, speedometer, and nethogs offer different perspectives on network activity, enabling comprehensive analysis of system network performance and efficient troubleshooting of connectivity issues.

Updated on: 2026-03-17T09:01:38+05:30

15K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements