Monitor Your Bandwidth using ibmonitor
What is ibmonitor ?
ibmonitor is an interactive linux console application which shows bandwidth consumed and total data transferred on all interfaces.
ibmonitor Features
- Shows received, transmitted and total bandwidth of each interface
- Calculates and displays the combined value of all interfaces
- Displays total data transferred per interface in KB/MB/GB
- Bandwidth Values can be displayed in Kbits/sec(Kbps) and/or KBytes/sec(KBps)
- 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.
Required Perl Modules
Required
The ibmonitor perl script requires the following perl modules:
1) Term::ANSIColor - Usually available with most linux distros
2) Term::ReadKey -needed for the "interactiveness" of ibmonitor.You can download Term::ReadKey from CPAN.
Just cut and paste the following link into your browser:
http://search.cpan.org/search?query=Term%3A%3AReadKey&mode=module
3) Time::HiRes - usually available with some distros Otherwise, download from CPAN.
http://search.cpan.org/search?query=Time%3A%3AHiRes&mode=module
Download ibmonitor
http://ibmonitor.sourceforge.net/download.html
Install ibmonitor in Debian
You need to download the latest version from the above download link once you downloaded that you should be having ibmonitor-1.3.tar.gz file now you need to unpack this using tar or unp tools.
#tar xzvf ibmonitor-1.3.tar.gz
#cd ibmonitor
If you want run ibmonitor you need to copy ibmonitor binary file in /usr/bin/ directory then you need to run the following commnd
#/usr/bin/ibmonitor
the screen appear like below
If you want to know the more options available for ibmonitor check below
Usage
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 proc] [--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 also read the input key from the user and dynamically change the output display format depending on the key pressed.
The following keys are supported. Note that ibmonitor responds directly to the single keystroke. ie. 'Enter' key need not be pressed.
Note: This will only work if you have the Term::ReadKey Perl module installed and working, hence the requirement.
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