1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
|
.TH bwm-ng 1 "2007-03-01" "" "Bandwidth Monitor NG"
.\"
.\" Man page written by Volker Gropp <bwmng@gropp.org> (Feb 2005)
.\" It was inspired by the iptables manpage
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.\"
.SH NAME
bwm-ng \- Bandwidth Monitor NG (Next Generation), a live bandwidth monitor for network and disk io.
.SH SYNOPSIS
.BI "bwm-ng "[options] " ... "[configfile] "
.SH DESCRIPTION
.B bwm-ng
can be used to monitor the current bandwidth of all or some specific
network interfaces or disks (or partitions). It shows
total of in and out as well as total of all interfaces/devices. Several
different output methods are supported (curses, curses2, plain, csv and html).
\fBbwm-ng\fP is not limited in the number of interfaces or disks and can handle
new ones dynamically while its running or hide those which are not up.
.SH INPUT METHODS
The input methods used pretty much depends on your OS and system.
You can choose the preferred method either at start or in curses during run-time.
Each method can only be used if
.B bwm-ng
was compiled with support for it.
Currently supported
.B network input methods:
.RS
.TP .4i
.BR "proc" :
This is the default for \fILinux\fP based systems. It parses the special
procfs file \fB/proc/net/dev\fP. This should be used if in doubt in
\fILinux\fP.
.TP
.BR "getifaddrs" :
This is the default on \fIBSD\fP systems like \fIFreeBSD\fP, \fINetBSD\fP,
\fIOpenBSD\fP and recent \fIMac OS X\fP (>=10.3). This should be used if in
doubt on those systems. It uses the getifaddrs systemcall.
.TP
.BR "kstat" :
This is the default for \fISolaris\fP. It uses the kstat systemcall.
.TP
.BR "sysctl" :
This is the default on Systems like \fIIRIX\fP and other \fIUNIX\fP. It can
be used on many other systems like early \fIMac OS X\fP as well. It uses the
sysctl systemcall.
.TP
.BR "netstat" :
This is a Backup for systems without the above, or other problems.
.TP
.BR "libstatgrab" :
.B bwm-ng
can use the external library libstatgrab to gather the data. please
refer to \fIhttp://www.i-scream.org/libstatgrab\fP for more info about
this.
.RE
Currently supported
.B disk input methods:
.RS
.TP .4i
.BR "disk" :
Shows the diskio on Linux 2.6+ systems using /proc/diskstats. Instead of packets
the number of read/writes will be shown.
.TP
.BR "kstatdisk" :
same as
.B kstat
network input but for disk io. It uses the kstat systemcall from Solaris.
.TP
.BR "sysctl" :
Written for \fINetBSD\fP and \fIOpenBSD\fP, but maybe working on other Platforms
aswell.
.TP
.BR "devstat" :
devstat library based input. You can find this on FreeBSD based systems.
.TP
.BR "ioservice" :
framework IOKit based input. You can find this on Darwin systems like MacOSX.
.TP
.BR "libstatdisk" :
same as
.B libstatgrab
but for disk io (\fIhttp://www.i-scream.org/libstatgrab/\fP).
.RE
.SH OUTPUT METHODS
You can select several different ways to output the data gathered by
\fBbwm-ng\fP.
You can use one of:
.RS
.TP .4i
.BR "curses" :
This is the default output method. Usually this fits you the most.
In \fIcurses\fP mode you can control \fBbwm-ng\fP with several keys.
Press 'h' for a online help. To quit using this mode either press 'q'
or ctrl-c.
.TP
.BR "curses2" :
Shows bar charts of the current IO, using curses output.
.TP
.BR "plain" :
\fIPlain\fP or \fIASCII\fP is mostly a backup if curses is not
available. You cannot control \fBbwm-ng\fP at all in this mode. To
quit press ctrl-c.
But for one single single output using
.ns bwm-ng -o plain -c 1
this is the mode that fits the best.
.TP
.BR "csv" :
\fICSV\fP is designed to use with scripts for easy parsing.
.sp
.BR "Type rate" :
.br
.nf
unix timestamp;iface_name;bytes_out/s;bytes_in/s;bytes_total/s;bytes_in;bytes_out;packets_out/s;packets_in/s;packets_total/s;packets_in;packets_out;errors_out/s;errors_in/s;errors_in;errors_out\\n
.fi
.sp
.BR "Type svg, sum, max" :
.br
.nf
unix timestamp;iface_name;bytes_out;bytes_in;bytes_total;packets_out;packets_in;packets_total;errors_out;errors_in\\n
.fi
.sp
To skip the first output with only zeros use:
.nf
bwm-ng -o csv -c 0
.fi
.TP
.BR "html" :
This is designed for use in the WWW. It uses the CSS file bwm-ng.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.
.RE
.SH OPTIONS
The options that are recognized by
.B bwm-ng
can be divided into 3 different groups. The long versions can only be used
if bwm-ng was compiled with getopt_long.
.SS INPUT
These options specify the method to gather the data as well as different
options for them.
.TP
.BI "-i, --input " "method"
selects which method to use. It can be one of the above (see
\fBINPUT METHODS\fP) if support for it was compiled in.
.TP
.BI "-f, --procfile " "filename"
selects the file to parse in \fBproc input method\fP. This is usually
\fI/proc/net/dev\fP.
.TP
.BI " --diskstatsfile " "filename"
selects the file to parse in \fBdisk input method\fP. This is usually
\fI/proc/diskstats\fP.
.TP
.BI " --partitionsfile " "filename"
selects the file to parse in \fBdisk input method\fP on older Kernel.
This is usually \fI/proc/partitions\fP.
.TP
.BI "-n, --netstat " "path"
specifies the binary to execute for \fBnetstat input method\fP. Because
this may be a security flaw support for this option is \fInot\fP compiled
in
.B bwm-ng
by default.
.SS OUTPUT
These options select the way to output the data and several options for
the output.
.TP
.BI "-o, --output " "method"
selects which method to use for output. It can be one of the above (see
\fBOUTPUT METHODS\fP) if support for it was compiled in.
.TP
.BI "-u, --unit " "value"
selects which unit to show. It can be one of \fIbytes\fP, \fIbits\fP,
\fIpackets\fP or \fIerrors\fP.
.TP
.BI "-T, --type " "value"
specifies the type of stats to show. Use one of \fIrate\fP for the current
rate/s, \fImax\fP for the maximal value achieved since startup of
\fBbwm-ng\fP, \fIsum\fP for the total sum counted since startup of
\fBbwm-ng\fP or \fIavg\fP for the average over the last 30 seconds.
.TP
.BI "-c, --count " "number"
number of outputs for \fIPlain\fP and \fICSV\fP output mode. Use '1' for
once single output. Using '0' in \fICSV\fP mode will skip first output
that always consists of zero values.
.TP
.BI "-C, --csvchar " "char"
specifies the delimiter char for \fICSV\fP mode. The default is ';'.
.TP
.BI "-F, --outfile " "filename"
specifies the use of a \fIoutfile\fP instead of \fIstdout\fP. This option
only affects \fICSV\fP and \fIHTML\fP mode.
.TP
.BI "-R, --htmlrefresh " "seconds"
sets the \fIHTML\fP Meta refresh field to seconds in \fIHTML\fP mode.
This will result in a reload of the page every \fIn\fP seconds by
the browser. If this is set you want to use \fI--htmlheader\fP as well.
.TP
.BI "-H, --htmlheader " "[value]"
if this option is used, \fBbwm-ng\fP will print the correct \fIHTML\fP
header (<html></html>) including Meta fields before and after data.
This is only useful in \fIHTML\fP mode. \fIvalue\fP can be 0 (off)
or 1 (on), if the value is not given '1' is used.
.TP
.BI "-N, --ansiout "
disable ANSI Codes for Plain output.
.TP
.BI " --longdisknames "
show long realnames of disks in Darwin (ioservice input)
.SS OTHER
These options specify the general behavior of \fBbwm-ng\fP.
.TP
.BI "-t, --timeout " "msec"
displays and gathers stats every \fIn\fP msec (1msec = 1/1000sec). The
default is 500msec.
.TP
.BI "-d, --dynamic " "[value]"
shows bytes and bits with dynamic unit like K, M or G (Kilo, Mega, Giga).
\fIvalue\fP can be 0 (off) or 1 (on), without a value '1' is used.
.TP
.BI "-a, --allif " "[mode]"
specifies whether only up and selected interfaces (\fImode\fP=0), all which
are up but maybe not selected (\fImode\fP=1) or all, even down and not
selected interfaces (\fImode\fP=2). If no interface list given
(\fI--interfaces\fP) \fImode\fP=1 and \fImode\fP=2 are the same.
.TP
.BI "-I, --interfaces " "list"
show only interfaces which are in this comma separated list (\fBwhitelist\fP).
If the list is prefixed by a '%' its meaning is negated and interfaces in this
list are hidden from output (\fBblacklist\fP). (Example: %eth0,tun0)
.TP
.BI "-S, --sumhidden " "[value]"
if given and the optional value is not 0, count also hidden and not shown
interfaces for total value.
.TP
.BI "-A, --avglength " "seconds"
sets the span in which the stats for average mode are collected. Default
is 30 seconds or 2*\fItimeout\fP.
.TP
.BI "-D, --daemon " "[value]"
fork into background and daemonize if given and the optional value is not 0.
This only affects \fIHTML\fP and \fICSV\fP mode and \fI--outfile\fP is
required.
.TP
.BI "-h, --help " ""
show a help of command line options.
.TP
.BI "-V, --version " ""
print version info
.SH CONFIGFILE
The behavior of \fBbwm-ng\fP can be also controlled by a \fIconfigfile\fP.
By default \fBbwm-ng\fP first reads /etc/bwm-ng.conf and then
~/.bwm-ng.conf. If specified on command line \fBbwm-ng\fP skips those.
It consists of the same long-options as used for command line as keys
followed by a '=' and the value. Lines starting with a # or unknown
key will be ignored.
For example:
.nf
DYNAMIC=1
UNIT=bits
PROCFILE=/proc/net/dev
OUTPUT=plain
.fi
.SH OTHER FILES
.BR "bwm-ng.css"
the CSS file used for html output.
.SH SEE ALSO
bwm-ng.conf-example for an example of the configfile, README for other
comments and hints about bwm-ng.
.br
\fIhttp://www.gropp.org/\fP for new version or further help and links.
.SH AUTHORS
Volker Gropp <bwmng@gropp.org> wrote bwm-ng and is current maintainer.
.br
For further Authors please refer to AUTHORS file which should come
with \fBbwm-ng\fP.
|