IT猫扑网:您身边最放心的安全下载站! 最新更新| 软件分类| 专题汇总| 手机版

您当前所在位置:IT猫扑网 > 操作系统 > LINUX > Mrtg、MRTG安装配置指导手册

Mrtg、MRTG安装配置指导手册

时间:2015-06-28 00:00 来源:IT猫扑网|http://www.itmop.com/ 作者:网管联盟 我要评论(0)

mrtg 安装(http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub),可以使用用mrtg-2.9.17.zip或者mrtg-2.9.29.zip 。在win32中的文件应该包含一个rateup.exe 。

mrtg 安装:
1.解压MRTG到c:mrtg-2.9.17目录下
2.安装perl,你要确信perl的系统目录路径跟下面列出的一致:
C:Perlbin;%SystemRoot%system32;%SystemRoot%;...
你可以到控制面板--系统--环境变量中看到这些信息。
如果你安装好了,可以在命令提示符下,到c:mrtg-2.9.17bin目录下,输入:
perl mrtg

系统会给你一个正常的错误信息,需要一个mrtg 安装的配置文件:
Usage: mrtg mrtg-2.9.17 is the Multi Router Traffic Grapher.If you want to know more about this tool, you might want
to read the docs. They came together with mrtg!Home: http://people.ee.ethz.ch/~oetiker/webtools/mrtg/配置MRTG:
首先应该建立一个MRTG的配置文件,你需要知道下面的一些信息:
1.了解你要监控的设备ip地址或者主机名,snmp的端口号码(如果不是标准的端口号码);
2.如果你想监控其它的输入输出字节,还需要知道设备得的SNMPOID
3.最好你还必须了解SNMP的只读团体字符串

现在用一个例子说明一下:设备ip为10.56.57.38,我们将监控流量和CPU负载
1.首先我们设置mrtg 安装的默认配置文件,在命令提示符下,进入到c:mrtg-2.9.17bin 目录下,输入下面命令:
perl cfgmaker public@10.56.57.38 --global &WorkDir: c:InetPubwwwrootMRTG& --output mrtg.cfg

这样就建立了一个初始的配置文件,注意这个文件中设备所有接口的存储号码。当你重配置你的设备时这些号码可能会被改变,因此你可以使用cfgmaker描述一些接口。

  1. C:mrtg-2.9.17mrtg-2.9.17bin>perl cfgmaker public@10.56.57.38 --global &WorkDi  
  2. r: c:InetPubwwwrootMRTG& --output mrtg.cfg  
  3. --base: Get Device Info on public@10.56.57.38:  
  4. --base: Vendor Id:  
  5. --base: Populating confcache  
  6. --snpo: confcache public@10.56.57.38: Descr MS TCP Loopback interface  
  7. --snpo: confcache public@10.56.57.38: Descr vmware Virtual Ethernet Adapter --> 
  8. --snpo: confcache public@10.56.57.38: Descr VMware Virtual Ethernet Adapter -->(duplicate)  
  9. --snpo: confcache public@10.56.57.38: Descr Intel 8255x-based Integrated Fast Ethernet  
  10. --snpo: confcache public@10.56.57.38: Ip 10.56.57.38 --> 16777221  
  11. --snpo: confcache public@10.56.57.38: Ip 127.0.0.1 --> 1  
  12. --snpo: confcache public@10.56.57.38: Ip 192.168.198.1 --> 3  
  13. --snpo: confcache public@10.56.57.38: Ip 192.168.240.1 --> 2  
  14. --snpo: confcache public@10.56.57.38: Type 24 --> 1  
  15. --snpo: confcache public@10.56.57.38: Type 6 --> 2  
  16. --snpo: confcache public@10.56.57.38: Type 6 --> 3 (duplicate)  
  17. --snpo: confcache public@10.56.57.38: Type 6 --> 16777221 (duplicate)  
  18. --snpo: confcache public@10.56.57.38: Eth--> 1  
  19. --snpo: confcache public@10.56.57.38: Eth 00-50-56-c0-00-08 --> 2  
  20. --snpo: confcache public@10.56.57.38: Eth 00-50-56-c0-00-01 --> 3  
  21. --snpo: confcache public@10.56.57.38: Eth 00-a0-c9-25-ba-9d --> 16777221  
  22. --base: Get Interface Info  
  23. --base: Walking ifIndex  
  24. --base: Walking ifType  
  25. --base: Walking ifSpeed  
  26. --base: Walking ifAdminStatus  
  27. --base: Walking ifOperStatus  
  28. --base: Writing mrtg.cfg  

现在基本mrtg 安装配置文件建立,你进入c:mrtg-2.9.17bin 目录下输入下面的命令看一下结果:
perl mrtg mrtg.cfg

现在你就可以通过web查看到一些流量信息。这些信息将每隔五分钟描述结果,这样你就得每隔几分钟运行一次。使MRTG实时运行:
现在我们希望让他实时运行,我们需要对他的配置文件进行设置,让他运行后不再终止。以避免每隔五分钟就的运行一次。
增加选项
RunAsDaemon: yes
到你的mrtg.cfg文件中并且开始运行:
start /Dc:mrtg-2.9.17bin wperl mrtg --logging=eventlog mrtg.cfg
如果你想停止的话,可以在任务管理器中终止wperl进程。

假如你想在win启动时就启动MRTG,可以使用下面的信息:
Target:wperl mrtg --logging=eventlog mrtg.cfg
Start in:c:mrtg-2.9.17bin
你可以参阅下面的页面信息:http://www.firedaemon.com/mrtg-howto.html
其使用firedaemon软件

关键词标签:Mrtg,MRTG安装

相关阅读 安装红帽子RedHat Linux9.0操作系统教程 Tomcat9.0如何安装_Tomcat9.0环境变量配置方法 多种操作系统NTP客户端配置 Linux操作系统修改IP Linux实现SCSI硬盘热插拔及在线识别 Linux下用CDMA modem拨号上网

文章评论
发表评论

热门文章 安装红帽子RedHat Linux9.0操作系统教程 安装红帽子RedHat Linux9.0操作系统教程 Linux服务器:设计高性能网站架构-LLMP Linux服务器:设计高性能网站架构-LLMP 使用Clonezilla迁移到虚拟Linux环境 使用Clonezilla迁移到虚拟Linux环境 Linux上的MRTG流量监控中心 Linux上的MRTG流量监控中心 Linux 双网卡绑定一个IP原理及实现 Linux 双网卡绑定一个IP原理及实现 linux和windows等系统远程控制ubuntu桌面 linux和windows等系统远程控制ubuntu桌面

相关下载

人气排行 Linux下获取CPUID、硬盘序列号与MAC地址 dmidecode命令查看内存型号 linux tc实现ip流量限制 安装红帽子RedHat Linux9.0操作系统教程 linux下解压rar文件 lcx.exe、nc.exe、sc.exe入侵中的使用方法 Ubuntu linux 关机、重启、注销 命令 查看linux服务器硬盘IO读写负载 linux命令行浏览器的使用方法 Linux NFS服务固定端口及防火墙配置 U盘安装Ubuntu 10.04 Linux清除用户登录记录和命令历史方法