How to Install and use bmon - Real Time Bandwidth Monitor in Linux

Channel: Linux
Abstract: $ bmon -i proc Set output modules bmon has some output modules. There are cursesbmon will use curses as the output. If we want to use ascii output

Maintaining a network also means maintaining its bandwidth. Bandwidth leak will lead the network users to complain and may impact to slow response from applications. On Linux system, we can use a tool called bmon to monitor the bandwidth in real-time.

What is bmon

Bmon or Bandwidth Monitoring is a tool that intended for debugging and monitor bandwidth in real-time access. This tool is capable to retrieving statistics from various input modules. It provides various output methods including a curses-based interface.

Installation

On my Zorin OS which based on Ubuntu 13.04, I can install it by typing :

Free Server Monitoring Cloud Servic...

To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

Free Server Monitoring Cloud Service Providers - Netdata & New Relic
$ sudo wajig install bmon

This will install bmon instantly. But bmon version on this Ubuntu 13.04 is 2.0.103. While the latest version at the time this article is written is version 3.1.

In this article, we will use the latest version. This version only available in tar.gz format. Here are the steps to install it.

1. Download the latest version from Carisma website

wget http://www.carisma.slowglass.com/~tgr/bmon/files/bmon-3.1.tar.gz

2. Extract it

$ tar zxfv bmon-3.1.tar.gz

3. Go to the extracted folder

$ cd bmon-3.1

4. Compile and install bmon

$ ./configure
$ make
$ sudo make install

Error messages :

If you have some errors that we had, this may help you.

Please note that we are using Ubuntu-based distribution. This steps might be different with other Linux distribution.

No CONFUSE library

To solve this error, install libconfuse library.

$ sudo wajig install libconfuse-common libconfuse-dev libconfuse0

No LIBNL library

To solve those errors, install LIBNL library.

$ sudo wajig install libnl-3-200 libnl-30200-dbg libnl-3-dev libnl-route-3-dev

More detail about LIBNL library can be found at bmon website: http://www.carisma.slowglass.com/~tgr/libnl/

Run bmon

After bmon installed, we can run bmon by typing bmon in the terminal.

With no option, bmon will run in default curses mode. Bmon graph is divided into some parts.

  • The first row shows us the available interfaces, receive transmit and transfer transmit. This rows is represented by l letter which mean list view.
  • The second row is graphical statistics. If the graph is not showing, you can press g button.
  • The third row shows us the detailed statistics of receive and transfer activity.
  • And the fourth row shows us the additional information.

To get some help on how to operate bmon, press question mark button (?).

We also can run bmon with options. Here are some options for bmon.

Set input modules

bmon has some input modules. There are netlink, proc, dummy and null.
To define it by yourself, we can use -i option. For example, if we want to use input from /proc/net/dev file, we can type :

$ bmon -i proc

Set output modules

bmon has some output modules. There are curses, ascii, format and null. By default, bmon will use curses as the output. If we want to use ascii output, we can type :

$ bmon -o ascii

To get help about ascii modules, type :

$ bmon -i ascii:help

Set specific interface to display

To do this, we can use -p option.

$ bmon -p eth0

With this option, bmon will only list the eth0 interface. If you put eth*, then will list all interface with pattern eth0, eth1 until ethX.

Set read interval

By default, bmon will statistics every 1 seconds. If we want to change it, we can use -r option. Say we want to change it into 10 seconds, we can run bmon with :

$ bmon -r 10
Conclusion

bmon can be a handy tool for debugging and monitor bandwidth in realtime mode. This program is light and easy to use. As usual, we can always type man bmon or bmon --help to display its manual page and explore it more detail.

Ref From: linoxide
Channels:

Related articles