#################################################### # Bandwidthd.conf # # Commented out options are here to provide # documentation and represent defaults # Subnets to collect statistics on. Traffic that # matches none of these subnets will be ignored. # Syntax is either IP Subnet Mask or CIDR subnet 10.1.3.0 255.255.255.0 #設置監控的網段 #subnet 192.168.0.0/24 subnet 172.16.1.0/24 # Device to listen on # Bandwidthd listens on the first device it detects # by default. Run "bandwidthd -l" for a list of # devices. dev "any" #(這是你要檢測的網卡ethx或any(所有),可以調整為對應的網絡連接設備) ################################################### # Options that don't usually get changed # An interval is 2.5 minutes, this is how many # intervals to skip before doing a graphing run skip_intervals 1 #默認2.5 minutes 刷新 # Graph cutoff is how many k must be transfered by an # ip before we bother to graph it graph_cutoff 1024 #默認1M 以上的流量才有圖形 #Put interface in promiscuous mode to score to traffic #that may not be routing through the host machine. #promiscuous true #設置網卡在混雜模式中記錄 #Log data to cdf file htdocs/log.cdf output_cdf true #在bandwidthd目錄中生成log2.cdf 以log.cdf格式數據記錄 #Read back the cdf file on startup recover_cdf true #在啟動bandwidth時重新讀取cdf的數據 #Libpcap format filter string used to control what bandwidthd see's #Please always include "ip" in the string to avoid strange problems filter "ip" #以ip為過濾對象 #Draw Graphs – This default to true to graph the traffic bandwidthd is recording #Usually set this to false if you only want cdf output or #you are using the database output option. Bandwidthd will use very little #ram and cpu if this is set to false. graph true #圖形生成 #Set META REFRESH seconds (default 150, use 0 to disable). meta_refresh 150 #網頁刷新時間:wq #保存