在FreeBSD平台下使用mrtg来监控cpu、内存、交换…

2009-05-13 02:20:39来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


介绍在FreeBSD平台下如何安装和使用mrtg来监控cpu、内存、交换分区、TCP连接以及本机网卡流量
1.安装
#安装apache2
cd /usr/ports/www/apache2
make install clean
#安装p5-SNMP
cd  /usr/ports/net-mgmt/p5-SNMP
make install clean
#安装mrtg
cd /usr/ports/net-mgmt/mrtg
make install clean
2.编写配置文件
LoadMIBs: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
WorkDir: /usr/local/www/data/mrtg
Language: chinese
#monitoring User vs Idle CPU usage
Target[kontor.cpu]:ssCpuRawUser.0&ssCpuRawIdle.0:public@192.168.0.150
RouterUptime[kontor.cpu]:
public@192.168.0.150
MaxBytes[kontor.cpu]: 100
Title[kontor.cpu]: CPU LOAD
PageTop[kontor.cpu]: User CPU Load %
Unscaled[kontor.cpu]: ymwd
ShortLegend[kontor.cpu]: %
YLegend[kontor.cpu]: CPU Utilization
Legend1[kontor.cpu]: User CPU in % (Load)
Legend2[kontor.cpu]: Idle CPU in % (Load)
LegendI[kontor.cpu]:  User
LegendO[kontor.cpu]:  Idle
Options[kontor.cpu]: growright,nopercent
#monitoring User vs System CPU usage
Target[kontor.usrsys]:ssCpuRawUser.0&ssCpuRawSystem.0:public@192.168.0.150
RouterUptime[kontor.usrsys]:
public@192.168.0.150
MaxBytes[kontor.usrsys]: 100
Title[kontor.usrsys]: CPU LOAD
PageTop[kontor.usrsys]: CPU (user and system) Load %
Unscaled[kontor.usrsys]: ymwd
ShortLegend[kontor.usrsys]: %
YLegend[kontor.usrsys]: CPU Utilization
Legend1[kontor.usrsys]: User CPU in % (Load)
Legend2[kontor.usrsys]: System CPU in % (Load)
LegendI[kontor.usrsys]:  User
LegendO[kontor.usrsys]:  System
Options[kontor.usrsys]: growright,nopercent
#monitoring Active CPU usage
Target[kontor.cpusum]:ssCpuRawUser.0&ssCpuRawUser.0:public@192.168.0.150 + ssCpuRawSystem.0&ssCpuRawSystem.0:public@192.168.0.150 + ssCpuRawNice.0&ssCpuRawNice.0:public@192.168.0.150
RouterUptime[kontor.cpusum]:
public@192.168.0.150
MaxBytes[kontor.cpusum]: 100
Title[kontor.cpusum]: CPU LOAD
PageTop[kontor.cpusum]: Active CPU Load %
Unscaled[kontor.cpusum]: ymwd
ShortLegend[kontor.cpusum]: %
YLegend[kontor.cpusum]: CPU Utilization
Legend1[kontor.cpusum]: Active CPU in % (Load)
LegendI[kontor.cpusum]:  Active
Options[kontor.cpusum]: growright,nopercent
#Monitoring TCP connections
Target[tcpopen]: .1.3.6.1.2.1.6.9.0&.1.3.6.1.2.1.6.9.0:public@192.168.0.150
Options[tcpopen]: nopercent,growright,gauge,noinfo
Title[tcpopen]: Open TCP connections
PageTop[tcpopen]: Open TCP connections
MaxBytes[tcpopen]: 1000000
YLegend[tcpopen]: # conns
ShortLegend[tcpopen]: connections
LegendI[tcpopen]:  Connections:
Legend1[tcpopen]: Open TCP connections
#Monitoring Free Memory

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD下如何安装nvidia显卡驱程

下一篇:如何安装lsof