category:

VPS data and bandwidth usage tracking with bandwidthd

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.
  1. Download the “Bandwidthd” software from the link http://sourceforge.net/projects/bandwidthd/files/
  2. Extract the zip archive and place it in a folder say c:inetpubbandwidthd.
  3. In IIS create  a virtual directory either to your existing website or under the default website and point the home directory to “C:Inetpubbandwidthdhtdocs”.
  4. Open the file C:Inetpubbandwidthdetcbandwidthd.conf and  provide the correct subnet of your network.
  5. 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.
  6. 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

  1. 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
  2. Next download the bandwidthd RPM according to your Linux distro from the link http://rpm.pbone.net/index.php3 (Search with “bandwidthd”)
  3. Install the RPM as below # rpm -ivh bandwidthd-2.0.1-9.el5.i386.rpm This will install bandwidthd under /var/www/bandwidthd
  4. 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” <Directory “/var/www/bandwidthd/htdocs”> Order Allow,Deny Allow from All </Directory>
  5. open /var/www/bandwidthd/etc/bandwidthd.conf and provide the correct subnet for your network.
  6. Restart the webserver # service httpd restart.
  7. Start the bandwidthd service # service bandwidthd start
  8. Now point your browser to http://<server IP>/bandwidthd and start checking the bandwidth statistics graphs.
Few screenshots
Share
Comments (4)

4 responses to “VPS data and bandwidth usage tracking with bandwidthd”

  1. Joeri says:

    Would bandwidthd work behide a iptables firewall?

  2. admin says:

    Yes Joeri, this utility would work fine behind an iptables firewall as iptables would only block incoming connections and bandwidthd is a daemon service withing the server.

  3. Zamorano says:

    open /var/www/bandwidthd/etc/bandwidthd.conf not found
    and httpd error “Starting httpd: [Wed Feb 02 07:19:08 2011] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 548 will probably never match because it overlaps an earlier Alias.
    httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName”

  4. Anirban says:

    It seems that there are some settings in the httpd.conf that conflicts with your bandwidthd Alias declaration in the the /etc/httpd/conf/httpd.conf. You can provide the configuration here. Also in the /etc/httpd/conf/httpd.conf file provide the correct server FQDN name or IP address against the directive “ServerName”.

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 37 = 45

Related:

Stay Updated

Please enter your details below to get
A Free Trial
x + x* =