Recommended Tools: bmon Network Monitoring Tool for Linux
-----------------------------------
Affected Roles: Administrator, Owner
Related Digital Watchdog VMS Apps: DW Spectrum® IPVMS
Last Edit: January 21, 2022
-----------------------------------
bmon Network Bandwidth Monitoring and Debugging Tool
bmon is a network monitoring and debugging tool for Unix systems that can be used to capture network statistics and display them in a text-based format. This can be useful for monitoring real-time bandwidth activity on Ubuntu/Linux systems.
This article will outline how to install the bmon Bandwidth Monitoring Tool for Linux.
**NOTE: This is an optional, supplemental tool that can be installed for Linux-based DW Spectrum® Servers. DW Blackjack® Servers shipping with Ubuntu 18.04 will come pre-loaded with this tool.
Supported/Affected Devices:
- DW Blackjack® Tower Server Series (Linux)
- DW Blackjack® Rack Server Series (Linux)
- DW Blackjack® E-Rack Series (Linux)
- DW Blackjack® P-Rack Series (Linux)
- DW Blackjack® Cube Series (Linux)
- DW Blackjack® Bolt Series
Enabling Repository Access
By default, DW Blackjack® Servers have OS updates disabled to prevent unexpected operating issues that may occur from auto-updates.
As so, Servers using Ubuntu have repository access disabled by default as well.
To install the bmon Network Monitoring Tool, the repository will need to be made accessible to acquire the installation files. If bmon is already installed and you are just seeking operating instructions, you can skip to the Using bmon to Monitor Network Activity section.
**DISCLAIMER: Please be aware that DW Blackjack® Servers have OS updates and repository access disabled by default. Altering a DW Blackjack® Server’s OS configuration from default settings are performed at the owner’s risk.
**NOTE: When using the Linux command line, be aware that commands are case-sensitive. Press the ENTER key after each command, unless otherwise instructed.
Add Repository Access
To restore repository access:
- Open the Terminal program on the Linux computer. You can do this by using the Search function in the system Unity menu.
Alternatively, you can simultaneously press the Ctrl+Alt+T keys on the keyboard to launch the Terminal program.
- The Terminal window will display.
To add the repository, use the command:
sudo add-apt-repository “deb http://us.archive.ubuntu.com/ubuntu/ xenial universe multiverse”
- You will be prompted to enter the superuser password. Use the root admin password (will not display):
Dw5pectrum
**NOTE: For older DW Blackjack units purchased prior to June 18, 2021, the previously utilized default Linux OS login was “admin/admin”.
- Follow adding the repository by adding the main repository as well:
sudo add-apt-repository “deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe multiverse”
- Next, to download updates, use the command:
sudo add-apt-repository “deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe multiverse”
Follow with command:
sudo apt-get update
- Allow the system to finish fetching the data packages.
You may enter the command again to double-check that the available updated data packages have been obtained by the computer.
sudo apt-get update
Repairing Broken Repository Dependencies
If an error occurs while attempting to add the repository, there is a chance that the atp-get command may be encountering issues when retrieving third-party dependencies. For example, such an error may display as:
The following packages have unmet dependencies:
E: Unable to correct problems, you have held broken packages.
If you encounter an issue with repository access or package corruption, refer to Repairing Broken Repository Dependencies for Ubuntu Servers for troubleshooting help.
Installing the bmon Network Monitoring Tool
The bmon installation package can be found in most default Linux repositories. However, older .rpm and .deb packages for Linux systems can also be downloaded and installed using the default package manager if needed.
Otherwise, to acquire the most recent version of bmon (i.e. version 4.0):
- Open the Terminal program on the Linux computer. You can do this by using the Search function in the system Unity menu.
Alternatively, you can simultaneously press the Ctrl+Alt+T keys on the keyboard to launch the Terminal program.
- The Terminal window will display.
Log in as the root Administrator with the following command:
sudo su
- When prompted, use the root admin password (will not display):
Dw5pectrum
**NOTE: For older DW Blackjack units purchased prior to June 18, 2021, the previously utilized default Linux OS login was “admin/admin”.
- Next, to build bmon, acquire the files from the source with:
git clone https://github.com/tgraf/bmon.git
- After downloading the files, select the directory of bmon with:
cd bmon
- Install bmon by entering:
sudo apt-get install build-essential make libconfuse-dev libnl-route-3-dev libncurses-dev pkg-config dh-autoreconf
- Use the following commands:
sudo ./autogen.sh
sudo./configure
sudo make
sudo make install
- Once the bmon Network Monitoring tool has finished installing, simultaneously press the Ctrl+X keys on the keyboard to save and close the Terminal program.
Using bmon to Monitor Network Activity
To run the bmon tool:
- Open the Terminal program on the Linux computer. You can do this by using the Search function in the system Unity menu.
Alternatively, you can simultaneously press the Ctrl+Alt+T keys on the keyboard to launch the Terminal program.
- The Terminal window will display.
To run bmon use the command:
bmon
- The bmon interface will display.
- RX bps – represents received bytes per second
- TX bps – represents transmitted bytes per second
bmon Bandwidth Details
To view more detailed information of bandwidth use, press the D key.
The statistics are represented as follows:
Left bmon Panel |
|
Statistic Label |
Information |
Bytes |
shows received and transmitted traffic in bytes |
Abort Error |
shows abort errors that have occurred between the connection of the packet source and the destination |
Collisions |
shows a count of collision errors that have occurred between the sending and receiving devices |
CRC Errors |
shows a count of cyclic redundancy check errors |
Errors |
shows the total count of errors |
Frame Error |
shows the count of frame errors, such as malformed frames caused by issues with network packets |
ICMPv6 |
shows the number of Internet Control Message Protocol v6 traffic packets |
ICMPv6 Errors |
shows the count of ICMP v6 errors |
Ip6 Broadcast |
shows the count of IPv6 broadcasts sent to all devices on the network |
Ip6 CE Packets |
shows the count of CE packets between the CE (customer edge) and PE (provider edge) connectivity service |
Ip6 Delivers |
shows the count of incoming IPv6 packets |
Ip6 ECT(1) Packets |
shows the count of ECN-Capable Transport (ECT) packets that have been marked to reduce and avoid network congestion |
Ip6 Header Errors |
shows count of packets with errors in the IPv6 Header |
Ip6 Multicast Packets |
shows the count of IPv6 multicast packets |
Ip6 Non-ECT Packets |
shows the count of IPv6 packets that were not flagged as ECT(1) |
Ip6 Reassembly/Fragment OK |
shows the count of IPv6 packets that were fragmented due to size and that have successfully been reassembled upon receipt |
Ip6 Reassembly Timeouts |
shows the count of IPv6 packets that were fragmented due to size, but failed to be reassembled upon receipt because of timeouts (lease times) |
Ip6 Truncated Packets |
shows the count of truncated IPv6 packets, meaning packets that were flagged by routers for exceeding the maximum transmission unit (MTU), then forwarded to the destination for an ICMP packet to shorten the packet MTU size |
Ip6 Discards |
shows the count of IPv6 packets that were discarded due to IPv6 connection issues between the source and destination |
Ip6 Packets |
shows the total count of IPv6 packets (all types) |
Missed Error |
shows the count of packets missing from a transmission; packets are typically numbered for recreating sent messages |
No Handler |
shows the count of packets for which no protocol handler was found |
Window Error |
shows the count of packets where the window (number of octets in the header) holds an abnormal number and cannot be read |
Right bmon Panel |
|
Statistic Label |
Information |
Packets |
shows packet traffic activity |
Carrier Errors |
shows the count of carrier errors that have occurred due to issues with duplex mismatch between network equipment or other signal/communication issues |
Compressed |
shows the count of compressed packets |
Dropped |
shows the count of packets dropped as a result of failure to reach the destination, possibly due to network congestion |
FIFO Errors |
shows the count of first in, first out (FIFO) buffer errors, likely due to the network interface transmission buffers being overrun with more data than it can offload |
Heartbeat Errors |
shows the count of regular signals (heartbeats) that have been lost with pieces of hardware or software, which can create synchronization issues |
ICMPv6 Checksum Errors |
shows the count of Internet Control Message Protocol v6 (IPMPv6) message checksum errors |
Ip6 Address Errors |
shows the count of errors due to bad IPv6 addresses |
Ip6 Broadcast Packets |
shows the count of IPv6 Broadcast packets |
Ip6 Checksum Errors |
shows the count of IPv6 checksum errors. ICMP and User Datagram Protocol (UDP) packets in IPv6 use checksums, but regular IPv6 IP packets do not. |
Ip6 ECT(0) Packets |
treated the same as IP6 ECT(1) Packets |
Ip6 Forwarded |
shows the count of IPv6 packets that have been delivered by unicast forwarding. Unicast hops the packets from source to destination through chains of intermediary routers and other network equipment |
Ip6 Multicasts |
shows the count of IPv6 packets that have been delivered by delivered by multicast forwarding. Multicast sends the packets to a group of destinations simultaneously. |
Ip6 No Route |
shows the count of no route errors, meaning that the destination was unreachable due to issues with calculating a route |
Ip6 Reassembly/Fragment Failures |
shows the count of IPv6 packets that were fragmented due to excessive size and was failed to be reassembled upon receipt |
Ip6 Reassembly/Fragment Requests |
shows the count of IPv6 packets that were fragmented due to excessive size and was successfully reassembled upon receipt |
Ip6 Too Big Errors |
shows the count of ICMP "too big" messages received, indicating that IPv6 packets were sent with larger size than the maximum transmission unit (MTU) |
Ip6 Unknown Protocol Errors |
shows the count of packets received using an unknown protocol |
Ip6 Octets |
shows the volume of octets received and transmitted. IPv6 has a header of 40 octets (320 bits, 8 bits per octet) and a minimum packet size of 1,280 octets (10,240 bits). |
Length Error |
shows the count of packets arriving with a length value in the header that's shorter than the minimum possible packet length |
Multicast |
shows a count of multicast broadcasts |
Over Errors |
shows a count of "over errors", meaning when the receive buffer has overflowed or packets have arrived with a frame value larger than what is supported |
bmon Controls Quick Reference
To view a Quick Reference of the bmon controls, simultaneously press the Shift+? Keys on the keyboard.
To exit the bmon interface, press the Shift+? Keys on the keyboard again.
bmon Statistics Interface
To view statistics of a given network interface, use the Up arrow and Down arrow on the keyboard to select a statistic. To monitor a specific interface, it must be presented as an argument.
- To set a policy defining which network interface to display, use the –p flag in the Terminal program.
- To use “bit per second” instead of “bytes per second), use the –bp flag in the Terminal program.
- To define the intervals per second, use the “–r” flag in the Terminal Program
**NOTE: In the following example, sample network interface “enp1s0” will be used in the examples below.
To view statistics of a specific interface in bmon using the Terminal program, use the command template:
bmon <flag> <network interface>
- Policy (-p) Example:
bmon –p enp1s0
- Bit per second (-bp) Example:
bmon –bp enp1s0
- Intervals per second (-r) (5 seconds) Example:
bmon –r 5 –p enp1s0
Using bmon Input Modules
The bmon tool features input modules that can be used to display statistical data about network interfaces.
**NOTE: In the following examples, “network interface” used in examples below is a placeholder for the network name.
Preceding the input module in the Terminal program with the flag “–i”, such input modules include:
- netlink – employs the Netlink protocol to collect interface and traffic control statistics from the kernel; this is a default input module.
bmon –i netlink <network interface>
- proc – reads interface statistics from the /proc/net/dev file; considered to be a legacy interface for backwards compatibility and as a fallback module if netlink is unavailable.
bmon –i proc –p <network interface>
- dummy – a programmable input module for debugging and testing purposes.
bmon –i dummy
- null – disables data collection
bmon –i null
To find additional information about an input module, you can use the “help” option set:
bmon –i <module>:help
Example netlink help:
bmon –i netlink:help
Using bmon Output Modules
The bmon tool also features output modules that can be used to display or export the statistical data collected by bmon input modules.
**NOTE: In the following examples, “network interface” used in examples below is a placeholder for the network name.
Preceding the output module in the Terminal program with the flag “–o”, such output modules include:
- curses – an interactive curses-based text user interface offering real-time rate estimations of each attribute; this is the default output mode.
bmon –p <network interface> –o curses
- ascii – a programmable text output used to display a list of network interfaces, detailed counters, and graphs in the bmon console; this is the default fallback output mode when curses is unavailable.
bmon –p <network interface> –o ascii
- format – a fully scriptable output mode meant for consumption by other programs to use output values at a later time in scripts or programs for analysis or otherwise.
bmon –p <network interface> –o format
To find additional information about an output module, you can use the “help” option set:
bmon –o <module>:help
Example curses help:
bmon –o curses:help
To find additional usage information, options, and examples, you can read the bmon “man” page:
man bmon