LinuxCommandLibrary

bmon

Monitor network bandwidth usage in real-time

TLDR

Display the list of all the interfaces

$ bmon [[-a|--show-all]]
copy

Display data transfer rates in bits per second
$ bmon [[-b|--use-bit]]
copy

Specify the policy to define which network interface(s) is/are displayed
$ bmon [[-p|--policy]] [interface_1,interface_2,interface_3]
copy

Specify the interval (in seconds) in which rate per counter is calculated
$ bmon [[-R|--rate-interval]] [2.0]
copy

SYNOPSIS

bmon [ options ] [ interface1 interface2 ... ]

PARAMETERS

-i interval
    Set update interval in seconds (default is 1 second).

-p device
    Specify interface(s) to display. Can be used multiple times.

-o output-mode
    Set output mode. Supported modes: ascii, curses, html (default is curses).

-r rate
    Base update rate for ASCII output (default is 1).

-l log-file
    Append all output to log-file.

-b
    Enable byte units output.

-f
    Use full units. When this is enabled units of 1024 are displayed.

-h
    Show help text.

-V
    Show version information.

DESCRIPTION

bmon is a real-time bandwidth monitoring tool for Linux and other Unix-like operating systems. It captures networking-related statistics from various kernel interfaces and presents them in a human-readable format. This allows users to visualize network traffic levels, identify bottlenecks, and understand the flow of data across different network interfaces.

bmon supports multiple output methods including an interactive curses-based user interface in terminal, a plain text output suitable for scripting, and an HTML output format. It shows various statistics such as packets per second, bytes per second, errors, and collision rates on each network interface. It dynamically adapts to different screen sizes and adjusts its output accordingly. bmon can be configured to monitor specific interfaces or all available interfaces, providing flexibility in network analysis.

It's particularly useful for system administrators and network engineers who need to observe network activity directly on a system, especially when remote graphical tools are not readily available or preferred. The low overhead of the command makes it valuable on resource-constrained systems where heavier network monitoring solutions might be impractical.

CAVEATS

On very busy networks, the accuracy of bmon's readings might be affected by the system's processing capacity. Certain output methods (e.g., HTML) might require additional configuration or dependencies to function correctly.

OUTPUT MODES

The different output modes provide flexibility in how the network data is presented. Curses offers an interactive terminal UI, ASCII is good for scripting and basic terminal viewing, and HTML allows viewing the data in a web browser.

SEE ALSO

tcpdump(1), iftop(1), netstat(1), vnstat(1)

Copied to clipboard