Thursday, April 12, 2012

How to Install BANDWIDTHD...



BANDWIDTHD...


INTRODUCTION:
It is important to know traffic usage of your client if you're a Linux network administrator. You can monitor your client in text mode, graphic mode or html exported like mrtg, cacti or bandwidthd and one of my favorite bandwidth monitor is bandwidthd.

BandwidthD tracks usage of TCP/IP network subnets and builds html files with graphs to display utilization. Charts are built by individual IPs, and by default display utilization over 2 day, 8 day, 40 day, and 400 day periods. Furthermore, each ip address's utilization can be logged out at intervals of 3.3 minutes, 10 minutes, 1 hour or 12 hours in cdf format, or to a backend database server. HTTP, TCP, UDP, ICMP, VPN, and P2P traffic are color coded.



Below are the setups to configure Bandwidthd..

Download Bandwidthd form http://sourceforge.net/projects/bandwidthd/files/

[root@arslan]# tar xvfz bandwidthd-2.0.1.tgz
[root@arslan]# cd bandwidthd
Configure and install the Bandwidthd source:
[root@arslan]# ./configure && make install

Please make sure you have:
libpcap from http://www.tcpdump.org/
libpng from http://www.libpng.org/
libgd from http://www.boutell.com/gd/

Now Edit /usr/local/bandwidthd/etc/bandwidthd.conf
to suit your network environment.

My Example is :


subnet 192.168.0.0/24
subnet 192.168.1.0/24
# Device to listen on
# Bandwidthd listens on the first device it detects
# by default.  Run "bandwidthd -l" for a list of
# devices.
dev "eth0"
#dev "eth1"


 Now Start Bandwidthd
/usr/local/bandwidthd/bandwidthd

You  can't see your graphic report until you set /usr/local/bandwidthd/htdocs/ folder to set as apache virtual directory. Add below line to your apache config file.

Alias /bandwidthd "/usr/local/bandwidthd/htdocs"
<Directory "/usr/local/bandwidthd/htdocs">
Order Allow,Deny
Allow from All
</Directory>


now go to browser and write http://your-server-ip/bandwidthd 

WE HAVE DONE IT......

No comments:

Post a Comment