1bwm-ng(1) Bandwidth Monitor NG bwm-ng(1)
2
3
4
6 bwm-ng - Bandwidth Monitor NG (Next Generation), a live bandwidth moni‐
7 tor for network and disk io.
8
10 bwm-ng [options] ... [configfile]
11
13 bwm-ng can be used to monitor the current bandwidth of all or some spe‐
14 cific network interfaces or disks (or partitions). It shows total of in
15 and out as well as total of all interfaces/devices. Several different
16 output methods are supported (curses, curses2, plain, csv and html).
17
18 bwm-ng is not limited in the number of interfaces or disks and can han‐
19 dle new ones dynamically while its running or hide those which are not
20 up.
21
22
23
25 The input methods used pretty much depends on your OS and system. You
26 can choose the preferred method either at start or in curses during
27 run-time. Each method can only be used if bwm-ng was compiled with
28 support for it.
29
30 Currently supported network input methods:
31
32 proc :
33 This is the default for Linux based systems. It parses the
34 special procfs file /proc/net/dev. This should be used if in
35 doubt in Linux.
36
37 getifaddrs :
38 This is the default on BSD systems like FreeBSD, NetBSD,
39 OpenBSD and recent Mac OS X (>=10.3). This should be used if
40 in doubt on those systems. It uses the getifaddrs system‐
41 call.
42
43 kstat :
44 This is the default for Solaris. It uses the kstat system‐
45 call.
46
47 sysctl :
48 This is the default on Systems like IRIX and other UNIX. It
49 can be used on many other systems like early Mac OS X as
50 well. It uses the sysctl systemcall.
51
52 netstat :
53 This is a Backup for systems without the above, or other
54 problems.
55
56 libstatgrab :
57 bwm-ng can use the external library libstatgrab to gather
58 the data. please refer to http://www.i-scream.org/libstat‐
59 grab for more info about this.
60
61 Currently supported disk input methods:
62
63 disk:
64 Shows the diskio on Linux 2.6+ systems using
65 /proc/diskstats. Instead of packets the number of
66 read/writes will be shown.
67
68 kstatdisk:
69 same as kstat network input but for disk io. It uses the
70 kstat systemcall from Solaris.
71
72 sysctl:
73 Written for NetBSD and OpenBSD, but maybe working on other
74 Platforms aswell.
75
76 devstat:
77 devstat library based input. You can find this on FreeBSD
78 based systems.
79
80 ioservice:
81 framework IOKit based input. You can find this on Darwin
82 systems like MacOSX.
83
84 libstatdisk:
85 same as libstatgrab but for disk io (http://www.i-
86 scream.org/libstatgrab/).
87
88
89
91 You can select several different ways to output the data gathered by
92 bwm-ng.
93
94 You can use one of:
95
96
97 curses:
98 This is the default output method. Usually this fits you the
99 most. In curses mode you can control bwm-ng with several
100 keys. Press 'h' for a online help. To quit using this mode
101 either press 'q' or ctrl-c.
102
103 curses2:
104 Shows bar charts of the current IO, using curses output.
105
106 plain:
107 Plain or ASCII is mostly a backup if curses is not avail‐
108 able. You cannot control bwm-ng at all in this mode. To quit
109 press ctrl-c. But for one single single output using this
110 is the mode that fits the best.
111
112 csv:
113 CSV is designed to use with scripts for easy parsing. For a
114 list of those elements please take a look at README - Specs
115 section. To skip the first output with only zeros use
116 bwm-ng -o csv -c 0
117
118 html:
119 This is designed for use in the WWW. It uses the CSS file
120 bwm-ng.css in current working dir. "--htmlrefresh" only
121 affects the refresh of the page by the browser. For best
122 results use the same value for --timeout and --htmlrefresh.
123
124
126 The options that are recognized by bwm-ng can be divided into 3 differ‐
127 ent groups. The long versions can only be used if bwm-ng was compiled
128 with getopt_long.
129
130
131 INPUT
132 These options specify the method to gather the data as well as differ‐
133 ent options for them.
134
135 -i, --input method
136 selects which method to use. It can be one of the above (see
137 INPUT METHODS) if support for it was compiled in.
138
139 -f, --procfile filename
140 selects the file to parse in proc input method. This is usually
141 /proc/net/dev.
142
143 --diskstatsfile filename"
144 selects the file to parse in disk input method. This is usually
145 /proc/diskstats.
146
147 --partitionsfile filename"
148 selects the file to parse in disk input method on older Kernel.
149 This is usually /proc/partitions.
150
151 -n, --netstat path
152 specifies the binary to execute for netstat input method.
153 Because this may be a security flaw support for this option is
154 not compiled in bwm-ng by default.
155
156
157 OUTPUT
158 These options select the way to output the data and several options for
159 the output.
160
161 -o, --output method
162 selects which method to use for output. It can be one of the
163 above (see OUTPUT METHODS) if support for it was compiled in.
164
165 -u, --unit value
166 selects which unit to show. It can be one of bytes, bits, pack‐
167 ets or errors.
168
169 -T, --type value
170 specifies the type of stats to show. Use one of rate for the
171 current rate/s, max for the maximal value achieved since startup
172 of bwm-ng, sum for the total sum counted since startup of bwm-ng
173 or avg for the average over the last 30 seconds.
174
175 -c, --count number
176 number of outputs for Plain and CSV output mode. Use '1' for
177 once single output. Using '0' in CSV mode will skip first output
178 that always consists of zero values.
179
180 -C, --csvchar char
181 specifies the delimiter char for CSV mode. The default is ';'.
182
183 -F, --outfile filename
184 specifies the use of a outfile instead of stdout. This option
185 only affects CSV and HTML mode.
186
187 -R, --htmlrefresh seconds
188 sets the HTML Meta refresh field to seconds in HTML mode. This
189 will result in a reload of the page every n seconds by the
190 browser. If this is set you want to use --htmlheader as well.
191
192 -H, --htmlheader [value]
193 if this option is used, bwm-ng will print the correct HTML
194 header (<html></html>) including Meta fields before and after
195 data. This is only useful in HTML mode. value can be 0 (off) or
196 1 (on), if the value is not given '1' is used.
197
198 -N, --ansiout
199 disable ANSI Codes for Plain output.
200
201 --longdisknames
202 show long realnames of disks in Darwin (ioservice input)
203
204
205 OTHER
206 These options specify the general behavior of bwm-ng.
207
208 -t, --timeout msec
209 displays and gathers stats every n msec (1msec = 1/1000sec). The
210 default is 500msec.
211
212 -d, --dynamic [value]
213 shows bytes and bits with dynamic unit like K, M or G (Kilo,
214 Mega, Giga). value can be 0 (off) or 1 (on), without a value
215 '1' is used.
216
217 -a, --allif [mode]
218 specifies whether only up and selected interfaces (mode=0), all
219 which are up but maybe not selected (mode=1) or all, even down
220 and not selected interfaces (mode=2). If no interface list given
221 (--interfaces) mode=1 and mode=2 are the same.
222
223 -I, --interfaces list
224 show only interfaces which are in this comma separated list
225 (whitelist). If the list is prefixed by a '%' its meaning is
226 negated and interfaces in this list are hidden from output
227 (blacklist). (Example: %eth0,tun0)
228
229 -S, --sumhidden [value]
230 if given and the optional value is not 0, count also hidden and
231 not shown interfaces for total value.
232
233 -A, --avglength seconds
234 sets the span in which the stats for average mode are collected.
235 Default is 30 seconds or 2*timeout.
236
237 -D, --daemon [value]
238 fork into background and daemonize if given and the optional
239 value is not 0. This only affects HTML and CSV mode and --out‐
240 file is required.
241
242 -h, --help
243 show a help of command line options.
244
245 -V, --version
246 print version info
247
248
250 The behavior of bwm-ng can be also controlled by a configfile. By
251 default bwm-ng first reads /etc/bwm-ng.conf and then ~/.bwm-ng.conf. If
252 specified on command line bwm-ng skips those. It consists of the same
253 long-options as used for command line as keys followed by a '=' and the
254 value. Lines starting with a # or unknown key will be ignored.
255
256 For example:
257 DYNAMIC=1
258 UNIT=bits
259 PROCFILE=/proc/net/dev
260 OUTPUT=plain
261
262
264 bwm-ng.css the CSS file used for html output.
265
266
268 bwm-ng.conf-example for an example of the configfile, README for other
269 comments and hints about bwm-ng.
270 http://www.gropp.org/ for new version or further help and links.
271
273 Volker Gropp <bwmng@gropp.org> wrote bwm-ng and is current maintainer.
274 For further Authors please refer to AUTHORS file which should come with
275 bwm-ng.
276
277
278
279 2007-03-01 bwm-ng(1)