man bwm-ng (Commandes) - Bandwidth Monitor NG (Next Generation), a live bandwidth monitor

NAME

bwm-ng - Bandwidth Monitor NG (Next Generation), a live bandwidth monitor

SYNOPSIS

bwm-ng [options] ... [configfile]"

DESCRIPTION

bwm-ng can be used to monitor the current Bandwidth of all or some specific Interfaces. It shows total of in and out as well as total of all Interfaces. Several different output methods are supported (curses, plain, csv and html).

bwm-ng is not limited in the number of interfaces and can handle new ones dynamically while its running or hide those which are not up.

INPUT METHODS

The used input methods pretty much depends on your OS and system. You can choose the prefered either at start or in curses during runtime. Each method can only be used if bwm-ng was compiled with support for it.

Currently supported are:

proc:
This is the default for Linux based systems. It parses the special procfs file /proc/net/dev. This should be used if in doubt in Linux.
getifaddrs:
This is the default on BSD systems like FreeBSD, NetBSD, OpenBSD and recent Mac OS X (>=10.3). This should be used if in doubt on those systems. It uses the getifaddrs systemcall.
kstat:
This is the default for Solaris. It uses the kstat systemcall.
sysctl:
This is the default on Systems like IRIX and other UNIX. It can be used on many other systems like early Mac OS X as well. It uses the sysctl systemcall.
netstat:
This is a Backup for systems without the above, or other problems.
libstatgrab:
bwm-ng can use the external library libstatgrab to gather the data. please refer to http://www.i-scream.org/libstatgrab/ for more info about this.

OUTPUT METHODS

You can select several different ways to output the data gathered by bwm-ng.

You can use one of:

curses:
This is the default output method. Usually this fits you the most. In curses mode you can control bwm-ng with severy keys. Press 'h' for a online help. To quit using this mode either press 'q' or ctrl-c.
plain:
Plain or ASCII is mostly a backup if curses is not available. You cannot control bwm-ng at all in this mode. To quit press ctrl-c. But for one single single output using this is the mode that fits the best.
csv:
CSV is designed to use with scripts for easy parsing. For a list of those elements please take a look at README - Specs section. To skip the first output with only zeros use
bwm-ng -o csv -c 0
html:
This is designed for use in the WWW. It uses the CSS file bwm-nd.css in current working dir. "--htmlrefresh" only affects the refresh of the page by the browser. For best results use the same value for --timeout and --htmlrefresh.

OPTIONS

The options that are recognized by bwm-ng can be divided into 3 different groups. The long versions can only be used if bwm-ng was compiled with getopt_long.

INPUT

These options specify the method to gather the data as well as different options for them.

-i, --input method
selects which method to use. It can be one of the above (see INPUT METHODS) if support for it was compiled in.
-f, --procfile filename
selects the file to parse in proc input method. This is usually /proc/net/dev.
-n, --netstat path
specifies the binary to execute for netstat intput method. Because this may be a security flaw support for this option is not compiled in bwm-ng by default.

OUTPUT

These options select the way to output the data and several options for the output.

-o, --output method
selects which method to use for otput. It can be one of the above (see OUTPUT METHODS) if support for it was compiled in.
-u, --unit value
selects which unit to show. It can be one of bytes, bits, packets or errors.
-T, --type value
specifies the type of stats to show. Use one of rate for the current rate/s, max for the maximal value achieved since startup of bwm-ng, sum for the total sum counted since startup of bwm-ng or avg for the average over the last 30 seconds.
-c, --count number
number of outputs for Plain and CSV output mode. Use '1' for once single output. Using '0' in CSV mode will skip first output that always consists of zero values.
-C, --csvchar char
specifies the delimiter char for CSV mode. The default is ';'.
-F, --outfile filename
specifies the use of a outfile instead of stdout. This option only affects CSV and HTML mode.
-R, --htmlrefresh seconds
sets the HTML Meta refresh field to seconds in HTML mode. This will result in a reload of the page every n seconds by the browser. If set this you want to use --htmlheader aswell.
-H, --htmlheader [value]
if this option is used, bwm-ng will print the correct HTML header (<html></html>) including Meta fields before and after data. This is only useful in HTML mode. value can be 0 (off) or 1 (on), if the value is not given '1' is used.

OTHER

These options specify the general behavior of bwm-ng.

-t, --timeout msec
displays and gathers stats every n msec (1msec = 1/1000sec). The default is 500msec.
-d, --dynamic [value]
shows bytes and bits with dynamic unit like K, M or G (Kilo, Mega, Giga). value can be 0 (off) or 1 (on), without a value '1' is used.
-a, --allif [mode]
specifies whether only up and selected interfaces (mode=0), all which are up but maybe not selected (mode=1) or all, even down and not selected interfaces (mode=2). If no interface list given (--interfaces) mode=1 and mode=2 are the same.
-I, --interfaces list
show only interfaces which are in this comma seperated list (whitelist). If the list is prefixed by a '%' its meaning is negated and interfaces in this list are hidden from output (blacklist). (Example: %eth0,tun0)
-S, --sumhidden [value]
if given and the optional value is not 0, count also hidden and not shown interfaces for total value.
-A, --avglength seconds
sets the span in which the stats for average mode are collected. Default is 30 seconds or 2*timeout.
-D, --daemon [value]
fork into background and daeonize if given and the optional value is not 0. This only affects HTML and CSV mode and --outfile is required.
-h, --help
show a help of command line options.
-V, --version
print version info

CONFIGFILE

The behavior of bwm-ng can be also controlled by a configfile. By default bwm-ng first reads /etc/bwm-ng.conf and then ~/.bwm-ng.conf. If specified in commandline bwm-ng skips those. It consists of the same long-options as used for commandline as keys followed by a '=' and the value. Lines starting with a # or not known key will be ignored.

For example:

DYNAMIC=1
UNIT=bits
PROCFILE=/proc/dev/net
OUTPUT=plain

OTHER FILES

bwm-ng.css the CSS file used for html output.

SEE ALSO

bwm-ng.conf-example for an example of the configfile, README for other comments and hints about bwm-ng.

http://www.gropp.org/ for new version or further help and links.

AUTHORS

Volker Gropp <bwmng@gropp.org> wrote bwm-ng and is current maintainer.

For further Authors please refer to AUTHORS file which should come with bwm-ng.