Bmon is a simple but powerful text-based network monitoring and debugging tool for Unix-like systems that captures network-related statistics and is a reliable and effective real-time bandwidth monitoring and rate estimator. Supports multiple input modules to read input and render output in multiple output modes, such as the switched curses user interface and programmable text output for scripting purposes.
The bmon bandwidth monitoring tool is installed in Linux and can be easily installed from the default package manager because almost all Linux distributions have bmon packages in the default repository, although the version may be older. If you want to install bmon version 4.0, on CentOS, RHEL, and Fedora
$ git clone https://github.com/tgraf/bmon.git
$ cd bmon
$ sudo yum install make libconfuse-devel libnl3-devel libnl-route3-devel ncurses-devel
$ sudo ./autogen.sh
$ sudo./configure
$ sudo make
$ sudo make install
On Debian, Ubuntu, and Linux Mint
$ git clone https://github.com/tgraf/bmon.git
$ cd bmon
$ sudo apt-get install build-essential make libconfuse-dev libnl-3-dev libnl-route-3-dev libncurses-dev pkg-config dh-autoreconf
$ sudo ./autogen.sh
$ sudo ./configure
$ sudo make
$ sudo make install
Once installed, run bmon:
$ bmon
To view more detailed graph statistics/information on bandwidth usage, press d to query. Press [Shift +?] Check out the quick reference below. To exit the screen, press [Shift +?] again .
To view statistics for a given interface, select it using the Up and Down arrows. However, to monitor only a specific interface, specify it as a parameter on the command line.
-p sets a policy that defines which network interfaces to display, in the following example we will monitor the enp1s0 network interface:
$ bmon -p enp1s0
To use bits per second instead of bytes per byte, use -b:
$ bmon-bp enp1s0
You can also use the bmon input module to provide statistics about interfaces, such as netlink collects interface and flow control statistics from the kernel using the Netlink protocol. This is the default input module. proc reads interface statistics from the /proc/net/dev file. It is considered a legacy interface and provides backward compatibility. If the Netlink interface is not available, it is a backup module. dummy is a programmable input module for debugging and testing purposes. null disables data collection.
To find additional information about the module, you can set the call using the help option. Such as:
$ bmon -i netlink:help
Call bmon when the proc input module is enabled:
$ bmon -i proc -p enp1s0
bmon can also use output modules to display or export statistics collected by the above input modules, such as curses, an interactive text user interface based on curses that displays real-time rate estimates and graphical representations of each property, which is the default output mode. Ascii is a simple programmable text output that displays a list of interfaces, detailed counters, and ICONS to the console. Default backup output mode when curses are not available. Format is a fully scriptable output mode that can be used by other programs, and the output value can also be used for analysis in the later use of scripts or programs. null means that this disables output.
Call bmon in ascii output mode:
$ bmon -p enp1s0 -o ascii
You can also run the format output module and use the obtained values for scripting or other programs:
$ bmon -p enp1s0 -o format
For more advice, you can also read bmon's manual page:
$ man bmon