Monitoring network bandwidth with bwm-ng
There are a bunch of utilities available to monitor bandwidth utilization on Linux hosts, and I’ve touched on a few in previous posts. I recently came across bwm-ng while perusing the Debian package repository, and decided to try it out. When bwm-ng is executed without any arguments, it provides a relatively simple curses interface with throughput statistics for each interface in the system:
$ bwm-ng
bwm-ng v0.6 (probing every 0.500s), press 'h' for help
input: /proc/net/dev type: rate
| iface Rx Tx Total
==============================================================================
lo: 0.00 KB/s 0.00 KB/s 0.00 KB/s
eth0: 2275.89 KB/s 57.56 KB/s 2333.45 KB/s
------------------------------------------------------------------------------
total: 2275.89 KB/s 57.56 KB/s 2333.45 KB/s
But the simplicity of the tool stops there, since there are a SLEW of options to control the output format, and whether or not sampled data is written to a file. This is a nifty utility, but I think I will stick with iftop.








Shakir Solomon on March 24th, 2009
on FreeBSD i use a built-in utility called systat which does the same, though it logs from the moment the interfaces are brought up and does not have to run in the background.
systat -ifstat
Interface Traffic Peak Total
tun1 in 0.000 KB/s 0.000 KB/s 1.116 KB
out 0.000 KB/s 0.000 KB/s 0.000 KB
tun0 in 0.656 KB/s 0.656 KB/s 3.341 GB
out 0.398 KB/s 0.398 KB/s 622.966 MB
lo0 in 0.000 KB/s 0.000 KB/s 66.461 MB
out 0.000 KB/s 0.000 KB/s 66.461 MB
rl1 in 0.429 KB/s 0.429 KB/s 699.435 MB
out 0.910 KB/s 0.910 KB/s 3.461 GB
rl0 in 0.745 KB/s 0.745 KB/s 2.695 GB
out 0.472 KB/s 0.472 KB/s 448.515 MB