table of contents
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- INPUT MODULES
- PRIMARY INPUT MODULES
- SECONDARY INPUT MODULES
- OUTPUT MODULES
- PRIMARY OUTPUT MODULES
- SECONDARY OUTPUT MODULES
- MODULE CONFIGURATION
- DISTRIBUTION
- DIAGRAM TYPES
- INTERFACE SELECTION
- CONFIGURATION FILE
- COLOR LAYOUTS
- BIND INTERFACE
- EXAMPLES
- KNOWN ISSUES
- FILES
- SEE ALSO
- AUTHOR
other versions
- wheezy 2.0.1-3
bmon(1) | General Commands Manual | bmon(1) |
NAME¶
bmon - Portable bandwidth monitor and rate estimatorSYNOPSIS¶
bmon [ -awShV ] [ -i <mod> ] [ -o <mod> ] [ -I <mod> ] [ -O <mod> ]DESCRIPTION¶
bmon is a portable bandwidth monitor with multiple input methods and output modes. A set of architecture specific input modules provide the core with the listof interfaces and their counters. The core stores this counters and provides rate estimation including a history over the last 60 seconds, minutes, hours and days to the output modules which output them according to the configuration.OPTIONS¶
- -i
- Set primary input module and its configuration. The argument "list" will result in a list of available input modules. See INPUT MODULES for more details.
- -o
- Set primary output module and its configuration. The argument "list" will result in a list of available output modules. See OUTPUT MODULES for more details.
- -I
- Set secondary input modules and their configuration. The argument "list" will result in a list of available secondary input modules.
- -O
- Set secondary output modules and their configuration. The argument "list" will result in a list of available secondary output modules.
- -f
- Set alternative configuration path.
- -p
- Set interface acceptance policy. See INTERFACE SELECTION for more details.
- -a
- Include interfaces even if their status is down.
- -r
- Set reading interval in which the input module will be called. The default for this is one second. Should be less or equal than 1 or a factor of it. Values not equal to 1 will result in additional rate calculation with the read interval as its unit.
- -s
- Set sleeping interval between calls to output short interval callbacks for interactive output modules. Changing this can affect the variance of read intervals.
- -w
- Enable signal driven output intervals. The output module will only be invoked upon receiving of SIGUSR1. Use bmon -S - to send the signal to a running bmon instance in signal driven mode.
- -S
- Send SIGUSR1 to a running bmon instance. This arugment takes either - which will result in invoking ps to find bmon instances or a pid directly.
- -h
- Prints a help text and exits.
- -V
- Prints the version and exits.
INPUT MODULES¶
Input modules provide the core with interface statistics. Two kinds of modules exist, primary and secondary input modules. Their main difference is usage, there may be only one primary module running at the same time while the number of secondary input modules is not limited.bmon -i netlink:help
PRIMARY INPUT MODULES¶
- netlink (Linux)
- Requires libnl and uses an rtnetlink to collect interface
statistics. This input module also provides statistics about traffic
control qdiscs and classes. It is the preferred input module on Linux.
- kstat (SunOS)
- Provides interface statistics on SunOS operating systems in
form of 32bit and 64bit counters. It is the preferred input module on
SunOS.
- sysctl (BSD, Darwin)
- Provides interface statistics on BSD and Darwin operating
systems. Is is the preferred input module on any BSD alike system.
- proc (Linux)
- Provides interface statistics on Linux using the proc
filesystem (/proc/net/dev). It is one of the fallback input modules on
Linux and will work on nearly every Linux kernel version.
- sysfs (Linux)
- Provides interface statistics on Linux using the sys
filesystem (/sys/class/net/). It may be used together with newer Linux
kernel versions but has no real advantage over the netlink input module.
It caches open file descriptors to speed it up and is used as fallback
method.
- netstat (POSIX)
- Provides limited interface statistics on almost any POSIX
operating system by invoking netstat -i -a. Only use this as last hope.
- dummy (any)
- The purpose of the dummy input module is for testing. It
generates in either a static or randomized form.
- nulll (any)
- Does not provide any interface statistics and thus can be
used to disable local interface collection.
SECONDARY INPUT MODULES¶
- distribution
- Collects interface statistics from other nodes. It is the
counterpart of the secondary output module called distribution. Its
purpose is to distribute statistics in real time with not too much
bandwidth consumption itself. See DISTRIBUTION for more details.
OUTPUT MODULES¶
Output modules are feeded with rate estimations and graphs from the core and print them out to the configured output device. Two kinds of modules exist, primary and secondary output modules. Their main difference is usage, there may be only one primary module running at the same time while the number of secondary output modules is not limited.bmon -o ascii:help
PRIMARY OUTPUT MODULES¶
- ascii
- The ascii output modules prints out the diagrams and lists
to standard output. The output format is highly configurable and suits as
vmstat alike tool for interface statistics.
- curses
- Interactive curses user interface providing real time rate
estimations and graphs. The default view is a list of all interfaces
grouped per node. The graphical history diagram and a list of detailed
counters may be enabled/disable during runtime. Press '?' while the UI is
running to see the quick reference.
SECONDARY OUTPUT MODULES¶
- html
- Writes all interface statistics and diagrams as HTML files
including a navigation menu for all nodes and their interfaces. The layout
can be easly changes by altering the stylesheet which will not be
overwritten.
- distribution (any)
- Distributes all statistics over the network using an UDP
based statistic distribution protocol. The default configuration will use
the multicast address all-nodes but it may also be configured so send to a
unicast address.
MODULE CONFIGURATION¶
ARGUMENT ::= modulename:OPTS[,modulename:OPTS[,...]]DISTRIBUTION¶
Statistic distribution is a powerful method to spread the statistic all over the network and make the available on every machine. The advantage over web based statistic overviews and multi terminal remote shell based solutions is its nearly realtime accuracy while being lightweight and not polluting the network too much. The protocol is UDP based and thus not reliable and optmized on size.DIAGRAM TYPES¶
You will find the following diagram types being used by all output modules in some form:- list
- A list of interfaces including their byte and packets rate
(bps/pps).
- graphical history diagram
- A graph showing the history of a counter over the last 60
(read interval/ seconds/minutes/hours/days). The outer left column is the
most recent rate while the outer right column is the most outdated. The
preferred diagram to impress co-workers.
- detailed
- Detailed counters such as error counters or other
attributes assigned to this interface. The list of attributes may very
depending on the input module and architecture of the host OS.
INTERFACE SELECTION¶
SELECTION ::= NAME[,NAME[,...]]- Examples:
lo,eth0,eth1
eth*,!eth0
CONFIGURATION FILE¶
Bmon will try and read configuration data from the following files in the specified order: /etc/bmon.conf, $HOME/.bmonrc.COLOR LAYOUTS¶
The layout is used to specify the look'n'feel of the curses output module. The color "default" represents the terminal color which can be used to keep the background transparent for transparent terminals.BIND INTERFACE¶
The bind interface can be used to bind not yet assigned keys to shell scripts. It currently works in the curses output module but it might be ported to other output modules in the future. The interface name of the currently selected interface is provided to the script via the first argument.EXAMPLES¶
To run bmon in curses mode monitoring the interfaces eth0 and eth1:bmon -i eth0,eth1 -o curses
bmon -o
'ascii:diagram=detailed;ynit=kb'
bmon -s -o
'ascii:diagram=graph;fgchar=#;bgcar=_;xunit=min'
bmon -o null -O distribution
bmon -I distribution:multicast -o
curses
bmon -i null -I distribution:multicast -o
null -O 'distribution:ip=10.0.0.1;errignore;forward'
bmon -I distribution:multicast -o null -O
html:path=/var/istats/
KNOWN ISSUES¶
The curses output modules doesn't work properly on NetBSD < 2.0 because getch() cannot be set to be non-blocking.FILES¶
/etc/bmon.confSEE ALSO¶
ifconfig(8), kstat(1M), netlink(3)AUTHOR¶
Thomas Graf <tgraf@suug.ch>October 27, 2004 | Bandwidth Monitor |