Bmon is a powerful, lightweight tool for monitoring and debugging network bandwidth across multiple interfaces. Its real-time updates and historical data capabilities make it indispensable for network administrators, developers, and anyone keen on maintaining optimal network performance. With its text-based user interface, Bmon provides a detailed view of traffic flow, making it easier to identify bottlenecks and understand bandwidth utilization. It stands out for its versatility, support for various operating systems, and ease of deployment in various environments.
The guide will now demonstrate quickly how to install Bmon on your Ubuntu 24.04, 22.04, or 20.04 LTS system. The exact instructions will also work for non-LTS releases.
Update Ubuntu Before Installing Bmon
To guarantee your system’s packages are current, start by updating Ubuntu. This step ensures compatibility and security before you add new software. Execute the command below in your terminal:
sudo apt update && sudo apt upgrade
This command refreshes your package list and upgrades all your installed packages to their latest versions.
Install Bmon Using APT Command
Bmon, a bandwidth monitoring tool, is included in Ubuntu’s default repositories, making its installation straightforward with the APT package manager. Use the following command to install Bmon:
sudo apt install bmon
Example BMON Commands
Running BMON for Network Traffic Monitoring
To initiate network traffic monitoring on your Ubuntu system, enter the following command in your terminal:
bmon
This command launches BMON, presenting real-time network usage data across all interfaces.
Filtering Results by Interface
To focus on a particular network interface, append the -i
option to your command, followed by the interface name you wish to monitor. For instance:
bmon -i eth0
This command narrows down the monitoring scope to display network usage statistics exclusively for the eth0
interface.
Saving Monitoring Results
BMON facilitates saving network usage data to a file for later examination. To achieve this, utilize the -o
option followed by your desired filename, like so:
bmon -o output.txt
Executing this command directs the output to a file named output.txt
within the current directory, making it accessible for future analysis.
Customizing Output Format
BMON supports output customization through format strings, which include placeholders substituted with real-time values. To display network usage for the eth0
interface in a bespoke format:
bmon -i eth0 -f '%name:%inbytes:%outbytes\n'
This command configures the output to show the interface name and the bytes received and sent, with each data point delineated by colons and organized on separate lines.
Exiting BMON
To terminate the BMON session, simply press q
or Ctrl+C
. This action will safely exit the program and return you to the terminal prompt.
q
Managing Bmon
Removing Bmon
To uninstall Bmon from your Ubuntu system, execute the command below:
sudo apt remove bmon
This command removes Bmon, freeing up resources and ensuring your system remains clutter-free.
Conclusion
In this guide, we walked through the steps to efficiently install, utilize, and manage Bmon on Ubuntu 24.04, 22.04 or 20.04. From updating your system to customizing Bmon’s output and even removing the software when it’s no longer needed, we’ve covered all the essentials to help you easily monitor your network traffic. Remember, keeping Bmon updated and routinely checking your network performance can significantly enhance your system’s efficiency. Whether you’re a seasoned sysadmin or just diving into network management, Bmon