目录
- 27.1. apt-get install
- 27.2. CentOS rpm/yum
- 27.3. source code
- 27.4. /etc/bandwidthd.conf
http://bandwidthd.sourceforge.net/
27.1. apt-get install
$ apt-cache search bandwidthd bandwidthd - Tracks usage of TCP/IP and builds html files with graphs bandwidthd-pgsql - Tracks usage of TCP/IP and builds html files with graphs $ sudo apt-get install bandwidthd ┌────────────────────────────────────────┤ BandwidthD ├────────────────────────────────────────┐ │ Bandwidthd needs to know which interface it should listen for traffic on. Only a single │ │ interface can be specified. If you want to listen on all interfaces you should specify the │ │ metainterface "any". Running "bandwidthd -l" will list available interfaces. │ │ │ │ Interface to listen on: │ │ │ │ any │ │ lo │ │ eth0 │ │ eth1 │ │ tun0 │ │ │ │ │ │ <Ok> │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ ┌────────────────────────────────────────┤ BandwidthD ├─────────────────────────────────────────┐ │ Bandwidthd can create graphs for one or several ip-subnets. Subnets are specified either in │ │ dotted-quad format (192.168.0.0 255.255.0.0) or in CIDR format (192.168.0.0/16) and │ │ separated by a comma. Example: 192.168.0.0/16, 10.0.0.0 255.0.0.0, 172.16.1.0/24. If you │ │ don't know what to specify then you can use 0.0.0.0/0 but it is strongly discouraged. │ │ │ │ Subnets to log details about: │ │ │ │ 10.8.0.2/32, 172.16.2.0/24, 10.8.0.0/24, 172.16.1.0/24_______________________________________ │ │ │ │ <Ok> │ │ │ └───────────────────────────────────────────────────────────────────────────────────────────────┘ $ sudo mkdir /www/bandwidth $ sudo vim /etc/bandwidthd/bandwidthd.conf htdocs_dir "/www/bandwidthd" $ sudo /etc/init.d/bandwidthd restart * Stopping BandwidthD bandwidthd [ OK ] * Starting BandwidthD bandwidthd [ OK ]
http://localhost/bandwidthd/index.html
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。