is an interactive linux console application which shows
bandwidth consumed and total data transferred on all interfaces.
Its main features are:
- Shows received, transmitted and total bandwidth of
- Calculates and displays the combined value of all
- Diplays total data transferred per interface in
- Values can be displayed in Kbits/sec(Kbps) and/or
- Can show maximum bandwidth consumed on each interface
since start of utility
- Can show average bandwidth consumption on each
interface since start of utility
- The output with all features (max, avg and display in
Kbps and KBps) easily fits on a 80x24 console or xterm
- Can interactively change its output display format
depending on key pressed by user.
This project is different from existing similar utilities in that it can
show the values in Kbits/sec (Kbps) and Kbytes/sec (KBps)
It also displays the total data transferred in KB/MB/GB dynamically
shifting the unit to adjust available field width
Also command line switches are available which allow to choose whether
maximum and average bandwidth.
ibmonitor responds to
certain key presses while running and can dynamically
change its output display format.
Read the usage section below for more
information about keystrokes available
- keypress m
-- Toggle view/hide max of all interfaces
and their outcome.
Future plans include to make it display dynamic multi-colored graphs
per interface using svgalib, and also make it respond to signals
so that it can communicate its values to other programs which would
need such data.
As an example, envision the following scenario:
- A web CGI script sends a signal to the ibmonitor process via IPC.
- The ibmonitor
process then communicates its data to the signalling process.
- This data is sent to the signalling process via some
predefined method of communication.
- The CGI script then interprets this data and outputs
a nicely formatted HTML page.
written in the Perl programming language.
Visit perl.com to learn more about this
The ibmonitor perl script makes use
of the perl modules Term::ReadKey, Term::ANSIColor and Time::HiRes
While Term::ANSIColor is available with most distributions of
perl (and Linux), you can download
Term::ReadKey and Time::HiRes from cpan.org
Currently, this utility will only run on linux distros which support
the /proc filesystem,
due to the fact that ibmonitor reads
the file /proc/net/dev for the byte counter values.
I will try to list all possible OSs here with the /proc file which
should get ibmonitor running on your system.
Any help regarding this would be much appreciated.
Contact me at - arcofdescent at gmail.com
Just copy the perl script named ibmonitor
into any directory which is
in your path. A good place would be /usr/bin/ibmonitor
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
||Show output values in KBits/sec.
This is the default
||Show output values in KBytes/sec
||Show maximum values per interface
||Show average values per interface
|Set time interval as n seconds. The
default is 2 seconds
||Show data transferred in KB/MB/GB
||Show some fancy coloring! (This is
||No fancy coloring please!
|Show output from device matching
|Specify which file to use in the
for the interface byte counter
||Show help and exit
||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
The following keys are supported. Note that ibmonitor responds
to the single keystroke. ie. The 'Enter' key need not be pressed
|1 - 9
|Set sleep time interval (in seconds)
to the digit entered
|| Toggle display of [m]ax bandwidth
|Toggle display of [a]verage bandwidth
|Toggle display of values in
|Toggle display of values in
|Toggle display of [d]ata
|Shift interface up/down.
This should be followed by the interface number,
and then the direction (u or d)
|[R]eset all values
| ? / h
|Help screen for interactive commands