Bmon - Network Bandwidth Monitor
Bmon is a powerful command-line utility for Linux that allows you to visualize and monitor network bandwidth utilization in real-time. It provides detailed statistics for network interfaces, making it an invaluable tool for system administrators and developers who need to understand network performance.
Monitor Network Interfaces
The primary function of Bmon is to display network traffic. You can monitor all active network interfaces or specify a particular one for focused analysis.
# Launch bmon to monitor all interfaces
bmon
# Monitor a specific network interface (e.g., eth0)
bmon -p eth0
Human-Readable Output
Bmon can display network rates in human-readable formats, making it easier to interpret the data. This is particularly useful when dealing with high bandwidth connections.
# Display human-readable bit and byte rates
bmon -b
Customizing Data History and Refresh Rate
You can control how much historical data Bmon keeps and how frequently it updates the display. This allows for fine-tuning the monitoring experience based on your needs.
# Limit the history data to a specific number of seconds (e.g., 10 seconds)
bmon -H 10
# Set the update interval to refresh data every n seconds (e.g., 2 seconds)
bmon -R 2
# Specify the maximum history size (e.g., 100 entries)
bmon -M 100
Advanced Output and Filtering
Bmon offers flexibility in how information is presented and allows you to filter interfaces based on patterns. It also supports outputting data in JSON format, which is ideal for scripting and integration with other tools.
# Display specific output with desired information (e.g., overview and details)
bmon -o 'ascii:overview,details'
# Use JSON output plugin (useful for scripting and automation)
bmon -o json
# Filter display for interfaces matching a regex pattern (e.g., only include devices starting with 'eth')
bmon -f 'eth.*'
External Resources
- Bmon Man Page
- MDN Network Information API (for web-based network monitoring concepts)
- Linux.com Article on Bmon