Nload - Monitor Network Traffic and Bandwidth Usage

Monitor network traffic and bandwidth usage in real-time with Nload. Learn how to use Nload to view network statistics, set refresh intervals, and customize output.

Nload

Understanding Nload for Network Monitoring

Nload is a command-line utility for Linux that allows you to monitor network traffic and bandwidth usage in real-time. It provides a clear and concise overview of incoming and outgoing data, making it an essential tool for system administrators and developers who need to keep track of their network activity.

Basic Nload Usage

To start monitoring your network, simply run the nload command. By default, it will display statistics for your primary network interface. You can also specify a particular interface, such as eth0, by passing its name as an argument.

# View network traffic and bandwidth usage for the default network interface
nload

# View network traffic and bandwidth usage for a specific network interface (e.g., eth0)
nload eth0

Customizing Nload Output

Nload offers several options to customize its output to suit your needs. You can adjust the refresh interval, change the units of measurement, and even modify the display colors.

Setting Refresh Interval and Units

The -t option allows you to set the refresh interval in milliseconds. The -u option lets you choose the unit of measurement, such as bits per second (b) or kilobytes per second (K).

# Set the refresh interval to a specific value in seconds (e.g., 2 seconds)
nload -t 2000

# Show traffic in bits per second instead of bytes per second
nload -u b

# Combine units and binary prefixes (e.g., KB/s, MB/s)
nload -u K

Advanced Configuration Options

For more advanced monitoring, Nload can be bound to a specific IP address using the -m flag. You can also alter the history average interval with -i and customize colors with -c. For environments that do not support color, the -o flag can disable it.

# Bind nload to a specific IP address for monitoring (e.g., 192.168.1.1)
nload -m 192.168.1.1

# Change the history average interval (e.g., average usage over the last 30 seconds)
nload -i 30

# Customize the display colors (e.g., setting background color to blue and graph color to red)
nload -c "background=blue:graphs=red"

# Disable color in output (useful for non-color terminals)
nload -o

# Log output to a specified file (e.g., /var/log/nload.log)
nload -o /var/log/nload.log

Further Resources

For more in-depth information on network monitoring and related tools, consider exploring the following resources: