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 [-hIpPsvV] [-a ifspec] [-c count] [-d delay] [-g format] [-n] [-p port] [-r] [-t] [interface ...]

PARAMETERS

-h
    display this help and exit

-I
    display internal information

-p
    plain (text) output instead of curses

-P
    don't try to use /proc/net/dev

-s
    autoscale numbers

-v
    be verbose

-V
    display version and exit

-a ifspec
    add interface(s) matching pattern

-c count
    stop after count updates

-d delay
    set update interval in seconds (default: 1)

-g format
    set output format: curses (default), plain, or csv

-n
    suppress legend

-r
    reverse display order

-t
    show totals row

DESCRIPTION

bmon is a lightweight, portable tool for real-time monitoring of network interface bandwidth usage on Linux and other Unix-like systems. It features a curses-based interactive display by default, showing inbound/outbound rates, packet counts, errors, and totals across multiple interfaces. Users can select specific interfaces, autoscale graphs, reverse display order, or suppress legends for cleaner views.

Key strengths include flexible output formats: interactive curses mode for terminals, plain text for scripts, and CSV for data logging and analysis. Update intervals are customizable (default 1 second), and it supports filtering interfaces by pattern. Unlike heavier tools, bmon has a small footprint, making it ideal for embedded systems, servers, or quick diagnostics.

It reads statistics from /proc/net/dev or sysfs, estimating rates via delta calculations. Verbose mode aids debugging, while internal info reveals backend details. Commonly used for troubleshooting congestion, verifying link speeds, or long-term logging with cron jobs. No daemon mode, but pairs well with tools like rrdtool for graphing.

CAVEATS

Requires ncurses library; run as root for full access to all interfaces. No persistent logging—use redirection or CSV mode. May miss short bursts due to sampling interval.

COMMON USAGE

bmon eth0: monitor single interface interactively.
bmon -p -d 0.5 -c 60 > stats.txt: log plain text every 0.5s for 1min.

FORMATS DETAIL

curses: full-screen TUI with graphs.
plain: one-line per update.
csv: timestamp, rx/tx bytes/pkts/errors per interface.

HISTORY

Developed by Thomas Graf around 2002-2003 as a portable alternative to BSD's bmon. Merged into util-linux briefly, now standalone or in moreutils. Actively maintained with Linux kernel stat support.

SEE ALSO

iftop(8), nload(1), iptraf(8), bwm-ng(1), vnstat(1), sar(1)

Copied to clipboard