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.
114
115 Type rate:
116 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
117
118 Type svg, sum, max:
119 unix timestamp;iface_name;bytes_out;bytes_in;bytes_total;packets_out;packets_in;packets_total;errors_out;errors_in\n
120
121 To skip the first output with only zeros use:
122 bwm-ng -o csv -c 0
123
124 html:
125 This is designed for use in the WWW. It uses the CSS file
126 bwm-ng.css in current working dir. "--htmlrefresh" only
127 affects the refresh of the page by the browser. For best
128 results use the same value for --timeout and --htmlrefresh.
129
130
132 The options that are recognized by bwm-ng can be divided into 3 differ‐
133 ent groups. The long versions can only be used if bwm-ng was compiled
134 with getopt_long.
135
136
137 INPUT
138 These options specify the method to gather the data as well as differ‐
139 ent options for them.
140
141 -i, --input method
142 selects which method to use. It can be one of the above (see
143 INPUT METHODS) if support for it was compiled in.
144
145 -f, --procfile filename
146 selects the file to parse in proc input method. This is usually
147 /proc/net/dev.
148
149 --diskstatsfile filename
150 selects the file to parse in disk input method. This is usually
151 /proc/diskstats.
152
153 --partitionsfile filename
154 selects the file to parse in disk input method on older Kernel.
155 This is usually /proc/partitions.
156
157 -n, --netstat path
158 specifies the binary to execute for netstat input method.
159 Because this may be a security flaw support for this option is
160 not compiled in bwm-ng by default.
161
162
163 OUTPUT
164 These options select the way to output the data and several options for
165 the output.
166
167 -o, --output method
168 selects which method to use for output. It can be one of the
169 above (see OUTPUT METHODS) if support for it was compiled in.
170
171 -u, --unit value
172 selects which unit to show. It can be one of bytes, bits, pack‐
173 ets or errors.
174
175 -T, --type value
176 specifies the type of stats to show. Use one of rate for the
177 current rate/s, max for the maximal value achieved since startup
178 of bwm-ng, sum for the total sum counted since startup of bwm-ng
179 or avg for the average over the last 30 seconds.
180
181 -c, --count number
182 number of outputs for Plain and CSV output mode. Use '1' for
183 once single output. Using '0' in CSV mode will skip first output
184 that always consists of zero values.
185
186 -C, --csvchar char
187 specifies the delimiter char for CSV mode. The default is ';'.
188
189 -F, --outfile filename
190 specifies the use of a outfile instead of stdout. This option
191 only affects CSV and HTML mode.
192
193 -R, --htmlrefresh seconds
194 sets the HTML Meta refresh field to seconds in HTML mode. This
195 will result in a reload of the page every n seconds by the
196 browser. If this is set you want to use --htmlheader as well.
197
198 -H, --htmlheader [value]
199 if this option is used, bwm-ng will print the correct HTML
200 header (<html></html>) including Meta fields before and after
201 data. This is only useful in HTML mode. value can be 0 (off) or
202 1 (on), if the value is not given '1' is used.
203
204 -N, --ansiout
205 disable ANSI Codes for Plain output.
206
207 --longdisknames
208 show long realnames of disks in Darwin (ioservice input)
209
210
211 OTHER
212 These options specify the general behavior of bwm-ng.
213
214 -t, --timeout msec
215 displays and gathers stats every n msec (1msec = 1/1000sec). The
216 default is 500msec.
217
218 -d, --dynamic [value]
219 shows bytes and bits with dynamic unit like K, M or G (Kilo,
220 Mega, Giga). value can be 0 (off) or 1 (on), without a value
221 '1' is used.
222
223 -a, --allif [mode]
224 specifies whether only up and selected interfaces (mode=0), all
225 which are up but maybe not selected (mode=1) or all, even down
226 and not selected interfaces (mode=2). If no interface list given
227 (--interfaces) mode=1 and mode=2 are the same.
228
229 -I, --interfaces list
230 show only interfaces which are in this comma separated list
231 (whitelist). If the list is prefixed by a '%' its meaning is
232 negated and interfaces in this list are hidden from output
233 (blacklist). (Example: %eth0,tun0)
234
235 -S, --sumhidden [value]
236 if given and the optional value is not 0, count also hidden and
237 not shown interfaces for total value.
238
239 -A, --avglength seconds
240 sets the span in which the stats for average mode are collected.
241 Default is 30 seconds or 2*timeout.
242
243 -D, --daemon [value]
244 fork into background and daemonize if given and the optional
245 value is not 0. This only affects HTML and CSV mode and --out‐
246 file is required.
247
248 -h, --help
249 show a help of command line options.
250
251 -V, --version
252 print version info
253
254
256 The behavior of bwm-ng can be also controlled by a configfile. By
257 default bwm-ng first reads /etc/bwm-ng.conf and then ~/.bwm-ng.conf. If
258 specified on command line bwm-ng skips those. It consists of the same
259 long-options as used for command line as keys followed by a '=' and the
260 value. Lines starting with a # or unknown key will be ignored.
261
262 For example:
263 DYNAMIC=1
264 UNIT=bits
265 PROCFILE=/proc/net/dev
266 OUTPUT=plain
267
268
270 bwm-ng.css the CSS file used for html output.
271
272
274 bwm-ng.conf-example for an example of the configfile, README for other
275 comments and hints about bwm-ng.
276 http://www.gropp.org/ for new version or further help and links.
277
279 Volker Gropp <bwmng@gropp.org> wrote bwm-ng and is current maintainer.
280 For further Authors please refer to AUTHORS file which should come with
281 bwm-ng.
282
283
284
285 2007-03-01 bwm-ng(1)