VPS data and bandwidth usage tracking with bandwidthd
Apr 27, 2010
You don’t need any database or snmp connection to monitor all of your client with bandwidthd an open source application for monitoring bandwidth usage on Apache and IIS. All you need just libcap, libpng, libgd and apache/IIS installed on your Linux/Windows system and you can monitor all your connected clients per IP and per connection protocol.
Installation and configuration in windows
Download the packages below and install them prior to installing the bandwidthd software
For installing gd-latest extract the zip archive and place it in a directory in C drive say “gd”. Navigate to the directory C:gdbin and copy the bgd.dll to c:windowssystem32 directory.
- Download the “Bandwidthd” software from the link
- Extract the zip archive and place it in a folder say c:inetpubbandwidthd.
- In IIS create a virtual directory either to your existing website or under the default website and point the home directory to “C:Inetpubbandwidthdhtdocs”.
- Open the file C:Inetpubbandwidthdetcbandwidthd.conf and provide the correct subnet of your network.
- Now navigate to the directory C:Inetpubbandwidthd and execute the batch file “Install Service.bat”. This will install a service for bandwidthd. Make the service start up type as automatic and start the service.
- Now point your web server as http://<server IP>/bandwidthd and you will now be able to view the graphs containing the bandwidth statistics.
Installation and configuration in Redhat/Centos/Fedora Linux
- As a prerequisite please ensure that you have libcap, libpng, libgd and apache installed in your computer.
# rpm -qa | grep libcap
# rpm -qa | grep libpng
# rpm -qa | grep gd
# rpm -qa | grep httpd
- Next download the bandwidthd RPM according to your Linux distro from the link
http://rpm.pbone.net/index.php3 (Search with “bandwidthd”)
- Install the RPM as below
# rpm -ivh bandwidthd-2.0.1-9.el5.i386.rpm
This will install bandwidthd under /var/www/bandwidthd
- Next open the httpd.conf file
# vi /etc/httpd/conf/httpd.conf
Add the lines as below to it and save:Alias /bandwidthd “/var/www/bandwidthd/htdocs”
Allow from All
- open /var/www/bandwidthd/etc/bandwidthd.conf and provide the correct subnet for your network.
- Restart the webserver
# service httpd restart.
- Start the bandwidthd service
# service bandwidthd start
- Now point your browser to http://<server IP>/bandwidthd and start checking the bandwidth statistics graphs.