装了个Bandwidthd,用来监控流量。
Bandwidthd是个监控流量的好东东。我在一台win2k3上装的,双口千兆网卡,一个口子接到核心交换机的mirror口了。
安装的步骤非常简单:
-
下载Bandwidthd,主页:http://bandwidthd.sourceforge.net/
-
下载bandwidthd-2.0.1-binary-windows.zip
-
解压,放到一个目录,我是放在F:\soft\
-
用记事本打开bandwidthd\etc目录下的bandwidthd.conf文件
# Subnets to collect statistics on. Bandwidthd supports
# ip subnet mask and CIDR syntax.
#在下面写上用CIDR的格式写上你要监控的子网
subnet 10.0.0.0 255.0.0.0
subnet 192.168.0.0/16
subnet 172.16.0.0/12
-
\# Device to listen on. Run "List Device Names" for a list
# of the devices in your machine. Bandwidthd listens on
# the first device it finds by default.
# dev "\Device\NPF_{5A7E5A78-2AA6-41F0-8824-073AE4785848}"
#运行bandwidthd目录下的Install Service.bat,得到网卡信息,我的是:
Description: Adapter for generic dialup and VPN capture
Name: "\Device\NPF_GenericDialupAdapter"
Description: Broadcom L2 NDIS client driver
Name: "\Device\NPF_{C8CA87D4-C5D0-4F0F-8C08-F2268A748823}"
Description: VMware Virtual Ethernet Adapter
Name: "\Device\NPF_{014B3BF3-A7BE-430A-A26A-1E66F1FC0325}"
Description: VMware Virtual Ethernet Adapter
Name: "\Device\NPF_{73C3E87B-CA2D-4D02-BD7E-AAD9421779C4}"
Description: Broadcom L2 NDIS client driver
Name: "\Device\NPF_{85A286B2-99A9-4937-858C-E3DDEEF95C34}"
Press any key to continue . . .
然后依葫芦画瓢,把你要参与流量监控的网卡写上去。
dev "\Device\NPF_{C8CA87D4-C5D0-4F0F-8C08-F2268A748823}"
dev "\Device\NPF_{85A286B2-99A9-4937-858C-E3DDEEF95C34}"
-
运行 Install Service.bat。我运行了,结果出了个错误,如下:
Bandwidthd will run out of F:\soft\bandwidthd-2.0.1-binary-windows\bandwidth
cygrunsrv: Error installing a service: OpenService: Win32 error 1073:
The specified service already exists.
Press any key to continue . . .
看了下windows的服务,多出一个bandwidthd,不过没运行,懒得管它了,手动启动它。
-
在IIS上发布bandwidthd目录,2.5分钟(默认时间)后,得到流量图:
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。