BandwidthD 是一套可以在區域網路上顯示各個 IP 網路使用情形的程式,由 David Hinkle 所開發。
BandwidthD 官方網站:http://bandwidthd.sourceforge.net/
底下是在 CentOS 6.x x64 下安裝[@more@]
1. 下載 rpm 檔
# wget ftp://ftp.pbone.net/mirror/li.nux.ro/download/nux/misc/el6/x86_64/bandwidthd-2.0.1-15.el6.nux.x86_64.rpm
2. 安裝所須套件
# yum install libpcap-devel libpng-devel gd-devel zlib-devel libpqxx
3. 安裝 BandwidthD
# rpm -ivh bandwidthd-2.0.1-15.el6.nux.x86_64.rpm
4. 修改設定檔 /etc/bandwidthd.conf
# vim /etc/bandwidthd.conf
加入要偵測的網段
subnet 192.168.1.0/24
5. 修改 /etc/httpd/conf.d/bandwidthd.conf
可以加上連線範圍的限定
# cat /etc/httpd/conf.d/bandwidthd.conf
Alias /bandwidthd /var/www/bandwidthd/htdocs
6. 設定開機時啟動
# chkconfig –level 3 bandwidthd on
# /etc/init.d/bandwidthd start