MRTG - CPU monitoring




Step 1

vi /etc/mrtg/mrtg.cfg ## CPU Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@127.0.0.1+ ssCpuRawSystem.0&ssCpuRawSystem.0:public@127.0.0.1+ssCpuRawNice.0&ssCpuRawNice.0:public@127.0.0.1 RouterUptime[localhost.cpu]: public@127.0.0.1 MaxBytes[localhost.cpu]: 100 Title[localhost.cpu]: CPU Load PageTop[localhost.cpu]: <H1>Active CPU Load %</H1> Unscaled[localhost.cpu]: ymwd ShortLegend[localhost.cpu]: % YLegend[localhost.cpu]: CPU Utilization Legend1[localhost.cpu]: Active CPU in % (Load) Legend2[localhost.cpu]: Legend3[localhost.cpu]: Legend4[localhost.cpu]: LegendI[localhost.cpu]: Active LegendO[localhost.cpu]: Options[localhost.cpu]: growright,nopercent ## CPU Load (user and system Target[cpu]: ssCpuRawUser.0&ssCpuRawSystem.0:public@localhost RouterUptime[cpu]: public@localhost Title[cpu]: CPU Load PageTop[cpu]: <H1>CPU Load (user and system)</H1> MaxBytes[cpu]: 100 WithPeak[_]: wmy Options[cpu]: growright,nopercent ShortLegend[cpu]: % YLegend[cpu]: CPU Utilization Legend1[cpu]: User CPU Load (%) Legend2[cpu]: System CPU Load (%) LegendI[cpu]: User Load LegendO[cpu]: System Load ### global options LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt Refresh: 300 Interval: 5 Language: utf8 Options[_]: growright

First , you need "locate UCD-SNMP-MIB.txt" and modify in global options

indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

Generate new index page and update mrtg


Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.