lizongbo at 618119.com 工作,生活,Android,前端,Linode,Ubuntu,nginx,java,apache,tomcat,Resin,mina,Hessian,XMPP,RPC

2008年01月7日

安装配置mrtg

Filed under: 未分类 — 标签:, — lizongbo @ 10:09

下载
http://oss.oetiker.ch/mrtg/pub/mrtg-2.15.2.zip

或: http://oss.oetiker.ch/mrtg/pub/mrtg-2.15.2.tar.gz

来源:http://oss.oetiker.ch/mrtg/download.en.html

前提:已经安装perl,
解压mrtg-2.15.2.zip到d:生成D:\mrtg-2.15.2
命令行下,进入到D:\mrtg-2.15.2\bin,运行perl mrtg进行验证.

D:\MRTG-2~1.2\bin>set perl5lib=D:\Perl\lib;%perl5lib%

D:\MRTG-2~1.2\bin>perl d:\mrtg-2.15.2\bin\indexmaker -output D:\Apache2.2\htdocs
\mrtg\index.html -title “性能统计” D:\Apache2.2\htdocs\mrtg\mrtg.cfg

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

D:\MRTG-2~1.2\bin>perl mrtg
创建文件夹 D:\mrtg-2.15.2\workdir\web1
命令行下转到D:\mrtg-2.15.2\bin,然后运行下列命令生成配置文件:
D:\mrtg-2.15.2\bin>perl d:\mrtg-2.15.2\bin\cfgmaker public@192.168.18.2 –global
“WorkDir: D:\mrtg-2.15.2\workdir\web1” –output D:\mrtg-2.15.2\workdir\web1\mrt
g_web1.cfg
//追加参数配置RunAsDaemon:yes到D:\mrtg-2.15.2\workdir\web1\mrtg_web1.
cf
D:\mrtg-2.15.2\bin>echo RunAsDaemon:yes >>D:\mrtg-2.15.2\workdir\web1\mrtg_web1.
cfg
//追加参数间隔周期Interval:5 到D:\mrtg-2.15.2\workdir\web1\mrtg_web1.cfg
D:\mrtg-2.15.2\bin>echo Interval:5 >>D:\mrtg-2.15.2\workdir\web1\mrtg_web1.cfg
//生成统计汇总页面
D:\mrtg-2.15.2\bin>perl D:\mrtg-2.15.2\bin\indexmaker D:\mrtg-2.15.2\workdir\web
1\mrtg_web1.cfg>D:\mrtg-2.15.2\workdir\web1\index.htm
//启动数据采集,并存以后台服务模式运行
D:\mrtg-2.15.2\bin>perl D:\mrtg-2.15.2\bin\mrtg –logging=mrtg.log D:\mrtg-2.15.
2\workdir\web1\mrtg_web1.cfg
Daemonizing MRTG …

通过D:/mrtg-2.15.2/workdir/web1/index.htm察看统计结果:

通过 D:/mrtg-2.15.2/workdir/web1/192.168.18.2_2.html 查看详情

在linux下遇到 下面的错误信息

ERROR: Can’t Execute ‘/usr/mrtg-2.15.2/bin/rateup’

用which命令找到rateup

root@618119.com:~#   which rateup
/usr/bin/rateup

然后执行 ln /usr/bin/rateup /usr/mrtg-2.15.2/bin/rateup

Powered by WordPress