本文参考了 http://guoxuemin.blog.51cto.com/379574/165807博客,非常感谢
过程很简单:
# System Processes Info
系统进程信息
#
Target[server.processes]: . 1.3.6 .1.2.1.25.1.6.0&.1.3.6.1.2.1.25.1.6.0:[email protected]
Title[server.processes]: Current Processes Running
PageTop[server.processes]: <H1>Current Processes Running</H1>
MaxBytes[server.processes]: 1000
ShortLegend[server.processes]: procs
YLegend[server.processes]: Current Processes Running
Legend1[server.processes]: Processes
LegendI[server.processes]: Running
LegendO[server.processes]:
Options[server.processes]: growright,nopercent,gauge
#
# User Sessions Info
用户会话信息
#
Target[server.users]: . 1.3.6 .1.2.1.25.1.5.0&.1.3.6.1.2.1.25.1.5.0:[email protected]
Title[server.users]: Current Users Sessions
PageTop[server.users]: <H1>Current Users Sessions</H1>
MaxBytes[server.users]: 10000
ShortLegend[server.users]: Sessions
YLegend[server.users]: Current Users Sessions
Legend1[server.users]: Users Sessions
LegendI[server.users]: Sessions
LegendO[server.users]:
Options[server.users]: growright,nopercent,gauge
#
# Established TCP Connections
#
Title[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]: <H1>Established TCP Connections</H1>
MaxBytes[server.estabcons]: 10000000000
ShortLegend[server.estabcons]: c/s
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In
LegendO[server.estabcons]:
Legend1[server.estabcons]: Established connections
Legend2[server.estabcons]:
Options[server.estabcons]: growright,nopercent,gauge
#
# New TCP Connection Monitoring
新的
TCP
连接情况
#
Title[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]: <H1>New TCP Connections</H1>
MaxBytes[server.newconns]: 10000000000
ShortLegend[server.newconns]: c/s
YLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connections
Legend2[server.newconns]: New outbound connections
Options[server.newconns]: growright,nopercent,perminute
#
# Memory Utilization
内存及虚拟内存使用情况
#
Target[server.memoryUsed]: . 1.3.6 .1.2.1.25.2.3.1.6.3&.1.3.6.1.2.1.25.2.3.1.6.4:[email protected] / .1.3.6.1.2.1.25.2.3.1.5.3&.1.3.6.1.2.1.25.2.3.1.5.4:[email protected] * 100
Title[server.memoryUsed]: Memory Used
PageTop[server.memoryUsed]: <H1>Memory Utilization</H1>
MaxBytes[server.memoryUsed]: 523444000
ShortLegend[server.memoryUsed]: %
YLegend[server.memoryUsed]: % Memory Used
Legend1[server.memoryUsed]: Vir in next minute
Legend2[server.memoryUsed]: Phy in next minute
Legend3[server.memoryUsed]: Maximal 5 Minute Vir
Legend4[server.memoryUsed]: Maximal 5 Minute Phy
LegendI[server.memoryUsed]: Vir
LegendO[server.memoryUsed]: Phy
Options[server.memoryUsed]: growright,nopercent,gauge
#
# Disk Utilization
硬盘使用情况
#
Target[server.storageUsed]: . 1.3.6 .1.2.1.25.2.3.1.6.1&.1.3.6.1.2.1.25.2.3.1.6.2:[email protected] / .1.3.6.1.2.1.25.2.3.1.5.1&.1.3.6.1.2.1.25.2.3.1.5.1:[email protected] * 100
Title[server.storageUsed]: Disk Used
PageTop[server.storageUsed]: <H1>Disk Utilization</H1>
MaxBytes[server.storageUsed]: 523444000
ShortLegend[server.storageUsed]: %
YLegend[server.storageUsed]: % Disk Used
Legend1[server.storageUsed]: C: in next minute
Legend2[server.storageUsed]: D: in next minute
Legend3[server.storageUsed]: Maximal 5 Minute C:
Legend4[server.storageUsed]: Maximal 5 Minute D:
LegendI[server.storageUsed]: C:
LegendO[server.storageUsed]: D:
Options[server.storageUsed]: growright,nopercent,gauge
将以上所有内容copy到C:\mrtg-2.15.2\bin里面的CFG文件中,保存
使用命令Perl indexmaker --output=c:\inetpub\wwwroot\mrtg\test\index.html c:\inetpub\wwwroot\mrtg\test\test.cfg重新生成网页,再使用命令:start /D c:\mrtg\bin wperl mrtg --logging=test
log c:\inetpub\wwwroot\mrtg\test\test.cfg 重新生成服务器test的流量图.
开始的时候,图片无法显示,重启设备后,图片显示有了,但是数据不正常。重启第二次后,图片显示正常。
原因我不太确认,可是是生成网页图片的过程出现了小BUG,重启二次机器后,mrtg工作正常。