Difference between revisions of "Bandwidthd"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Network_related_tools|Network tools</yambe:breadcrumb> =bandwidthd= bandwidthd can be used to check bandwidth usage by each IP on a gateway or proxy machine...")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb>Network_related_tools|Network tools</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Network related tools]] > [[Bandwidthd]]
=bandwidthd=


bandwidthd can be used to check bandwidth usage by each IP on a gateway or proxy machine for monitoring purposes.  To install bandwidthd use following steps:
bandwidthd can be used to check bandwidth usage by each IP on a gateway or proxy machine for monitoring purposes.  To install bandwidthd use following steps:
Line 6: Line 5:
# Configure all repositories such as rpmfusion, repoforge, etc. (esp. epel)
# Configure all repositories such as rpmfusion, repoforge, etc. (esp. epel)
# yum -y install bandwidthd
# yum -y install bandwidthd
# yum -y install apache mod_ssl php php-gd
# yum -y install httpd mod_ssl php php-gd
# vim /etc/bandwidth.conf
# vim /etc/bandwidth.conf
## Ensure that subnets are correct
## Ensure that subnets are correct
## Set correct device named eg "dev venet0", "dev eth1", etc.
## Set correct device named eg "dev venet0", "dev eth1", etc.
## Update "output_cdf true" to store data in cdf file on stop
## Update "recover_cdf true" to read back the cdf file on startup
# service bandwidthd start
# service bandwidthd start
# service httpd restart
# service httpd restart
# chkconfig bandwidthd on
# chkconfig bandwidthd on
# chkconfig bandwidthd on
# chkconfig httpd on
# Open http://192.168.122.102/bandwidthd/ to see the bandwidth usage graph
# Open http://192.168.122.102/bandwidthd/ to see the bandwidth usage graph


Line 26: Line 27:
#:</pre>
#:</pre>
#::Here replace "Allow from All" appropriately
#::Here replace "Allow from All" appropriately
==Need to restart bandwidthd frequently as it crashes too often==
To restart bandwidhtd every hour to take care of its crashes, create '<tt>/etc/cron.hourly/restart_bandwidthd.sh</tt>' with following contents:
<pre>
#!/bin/bash
systemctl restart bandwidthd
</pre>
Do "chmod +x /etc/cron.hourly/restart_bandwidthd.sh".
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Network related tools]] > [[Bandwidthd]]

Latest revision as of 13:07, 23 August 2022

Home > CentOS > CentOS 6.x > Network related tools > Bandwidthd

bandwidthd can be used to check bandwidth usage by each IP on a gateway or proxy machine for monitoring purposes. To install bandwidthd use following steps:

  1. Configure all repositories such as rpmfusion, repoforge, etc. (esp. epel)
  2. yum -y install bandwidthd
  3. yum -y install httpd mod_ssl php php-gd
  4. vim /etc/bandwidth.conf
    1. Ensure that subnets are correct
    2. Set correct device named eg "dev venet0", "dev eth1", etc.
    3. Update "output_cdf true" to store data in cdf file on stop
    4. Update "recover_cdf true" to read back the cdf file on startup
  5. service bandwidthd start
  6. service httpd restart
  7. chkconfig bandwidthd on
  8. chkconfig httpd on
  9. Open http://192.168.122.102/bandwidthd/ to see the bandwidth usage graph


To restrict access to bandwidthd to administrators use:

  1. Edit /etc/httpd/conf.d/bandwidthd.conf and append
    <Directory "/var/www/bandwidthd/htdocs">
    Order Allow,Deny
    Allow from All
    </Directory>
    Here replace "Allow from All" appropriately


Need to restart bandwidthd frequently as it crashes too often

To restart bandwidhtd every hour to take care of its crashes, create '/etc/cron.hourly/restart_bandwidthd.sh' with following contents:

#!/bin/bash

systemctl restart bandwidthd

Do "chmod +x /etc/cron.hourly/restart_bandwidthd.sh".


Home > CentOS > CentOS 6.x > Network related tools > Bandwidthd