ibmonitor is a Perl script that can be used to monitor bandwidth usage.
Interface Received Sent Total Kbps Kbps Kbps eth0 189.04 4.00 193.12 lo 0.00 0.00 0.00 All 189.04 4.00 193.12 Press 'q' to quit... Elapsed time: 0 hrs, 0 mins, 4 s
If you hit the m
key while the program is running, it will show the maximum
bandwidth used while it has been running. You can also start the program with
ibmonitor --max
to display the maximum bandwidth utilization.
Interface Received Sent Total Kbps Kbps Kbps eth0 294.40 5.92 300.32 |---- Max 443.12 64.40 448.40 lo 0.00 0.00 0.00 |---- Max 20.24 20.24 40.56 All 294.40 5.92 300.32 |---- Max 453.28 74.56 468.64 Press 'q' to quit... Elapsed time: 0 hrs, 0 mins, 43 s
ibmonitor is a command line program which will run
on a linux console or xterm (rxvt, konsole, gnome-terminal, etc)
usage: ibmonitor [ --bits ] [ --bytes ] [ --max ] [ --avg ] [ --interval n ] [--data]
[ --colors | --nocolors ] [--dev regex] [--file procfile]
[ --help ] [--version]
The following command line options (and their explanation) are available:
--bits | Show output values in KBits/sec. This is the default |
--bytes | Show output values in KBytes/sec |
--max | Show maximum values per interface |
--avg | Show average values per interface |
--interval n |
Set time interval as n seconds. The default is 2 seconds |
--data | Show data transferred in KB/MB/GB |
--colors | Show some fancy coloring! (This is the default) |
--nocolors | No fancy coloring please! |
--dev regex |
Show output from device matching
regex |
--file proc |
Specify which file to use in the
proc filesystem for the interface byte counter |
--help | Show help and exit |
--version | Show version number and exit |
While running, ibmonitor can read the input key from the user
and dynamically change its output display format depending on the key
pressed.
The following keys are supported. Note that ibmonitor responds immediately
to the single keystroke. ie. The 'Enter' key need not be pressed
q |
[q]uit |
1 - 9 |
Set sleep time interval (in seconds) to the digit entered |
m | Toggle display of [m]ax bandwidth |
a |
Toggle display of [a]verage bandwidth |
i |
Toggle display of values in KB[i]ts/sec (Kbps) |
y |
Toggle display of values in KB[y]tes/sec (KBps) |
d |
Toggle display of [d]ata transferred |
s |
Shift interface up/down. This should be followed by the interface number, and then the direction (u or d) |
r |
[R]eset all values |
? / h |
Help screen for interactive commands |
References:
-
ibmonitor Interactive Bandwidth Monitor
SourceForge.net -
Perl ReadKey Module for ibmonitor
Date: October 26, 2007
MoonPoint Support