知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
http://bandwidthd.sourceforge.net/
$ 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