网络流量监控器mrtg[5]

[入库:2005年9月21日] [更新:2007年3月24日]

本文简介:

######################################################################
# System: 192.168.0.1
# Description: Linux 192.168.0.1 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686
# Contact: Root (configure /etc/snmp/snmp.local.conf)
# Location: Unknown (edit /etc/snmp/snmpd.conf)
######################################################################


### Interface 1 >> Descr: lo | Name: | Ip: 127.0.0.1 | Eth: ###
### The following interface is commented out because:
### * it is a Software Loopback interface

# Target[192.168.0.1_127.0.0.1]: /127.0.0.1: public@192.168.0.1:
# SetEnv[192.168.0.1_127.0.0.1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo"
# MaxBytes[192.168.0.1_127.0.0.1]: 1250000
# Title[192.168.0.1_127.0.0.1]: Traffic Analysis for 127.0.0.1 -- 192.168.0.1
# PageTop[192.168.0.1_127.0.0.1]:

Traffic Analysis for 127.0.0.1 -- 192.168.0.1

#
#

#

#

#

#

#

#

#

System:
192.168.0.1 in Unknown (edit /etc/snmp/snmpd.conf)

Maintainer:
Root <root@localhost> (configure /etc/snmp/ snmp.local.conf)

Description:
lo

ifType:
softwareLoopback (24)

ifName:


Max Speed:
10.0 Mbits/s

Ip:
127.0.0.1 (localhost)

### Interface 2 >> Descr: eth0 | Name: | Ip: 211.99.43.111 | Eth:

Target[192.168.0.1_211.99.43.158]: /211.99.43.158: public@192.168.0.1:
SetEnv[192.168.0.1_211.99.43.158]: MRTG_INT_IP="211.99.43.158" MRTG_INT_DESCR="eth0"
MaxBytes[192.168.0.1_211.99.43.158]: 1250000
Title[192.168.0.1_211.99.43.158]: Traffic Analysis for 211.99.43.158 -- 192.168.0.1
PageTop[192.168.0.1_211.99.43.158]:

Traffic Analysis for 211.99.43.158 - - 192.168.0.1


System:
192.168.0.1 in Unknown (edit /etc/snmp/snmpd.conf)

Maintainer:
Root <root@localhost> (configure /etc/snmp/ snmp.local.conf)

Description:
eth0

ifType:
ethernetCsmacd (6)

ifName:


Max Speed:
10.0 Mbits/s

Ip:
211.99.43.158 (192.168.0.1)

### Interface 3 >> Descr: eth1 | Name: | Ip: 192.168.0.1 | Eth:

Target[192.168.0.1_192.168.0.1]: /192.168.0.1: public@192.168.0.1:
SetEnv[192.168.0.1_192.168.0.1]: MRTG_INT_IP="192.168.0.1" MRTG_INT_DESCR="eth1"
MaxBytes[192.168.0.1_192.168.0.1]: 1250000
Title[192.168.0.1_192.168.0.1]: Traffic Analysis for 192.168.0.1 -- 192.168.0.1
PageTop[192.168.0.1_192.168.0.1]:

Traffic Analysis for 192.168.0.1 -- 192.168.0.1

>


System:
192.168.0.1 in Unknown (edit /etc/snmp/snmpd.conf)

Maintainer:
Root <root@localhost> (configure /etc/snmp/ snmp.local.conf)

Description:
eth1

ifType:
ethernetCsmacd (6)

ifName:


Max Speed:
10.0 Mbits/s

Ip:
192.168.0.1 (192.168.0.1)

运行mrtg

一旦生成正确的配置文件,就运行下面的命令:

/usr/local/mrtg-2/bin/mrtg /etc/mrtg.cfg

这将查询被监控的设备并在工作目录下创建初始的流量图和web页面,在前三次运行时可 能会报告遗失日志文件的告警信息,不要理睬这些信息,只需要连续运行三次以后再运行 就不会产生告警信息了。如果仍然出现告警那么就需要察看问题出在哪里了。

使用手工运行mrtg并不能定时产生适当的统计信息,因此最好还是定时自动运行mrtg来生 成统计信息,默认为五分钟运行一次。作为root身份crontab -e进入编辑状态,添加内容 如下:

*/5 * * * * /usr/local/mrtg-2/bin/mrtg /etc/mrtg.cfg

本文关键:网络流量监控器mrtg
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top