Memory Usage with MRTG

Taking care of your Linux box.
Post Reply
rmuhammadali
Cadet
Posts: 5
Joined: Wed Oct 07, 2009 1:17 pm
Location: Faislabad - Pakistan

Memory Usage with MRTG

Post by rmuhammadali »

Dear All,
I am trying to configure MRTG to calculate my system memory usage, i have wrote the following syntex. It makes the reporting graph but there is no update show in it.

Target[LocalMem]: memTotalReal.0&memTotalReal.0:public@localhost + memAvailReal.0&memAvailReal.0:public@localhost + memTotalFree.0&memTotalFree.0:public@localhost
Options[LocalMem]: nopercent, growright, unknaszero
Title[LocalMem]: Physical Memory Usage Graph
PageTop[LocalMem]: <h1>Physical Memory Usage Graph</h1>
MaxBytes[LocalMem]: 536870912
YLegend[LocalMem]: Memory Usage
UnScaled[LocalMem]: ymwd

Please help!

Regards
Ali
zaib
Naik
Posts: 97
Joined: Thu Jan 10, 2008 3:11 pm
Location: Karachi
Contact:

Post by zaib »

Have you properly configured SNMP on your *nix box ? can you snmpwalk to your required OID ?

BTW, following are my Memory monitoring Scripts for MRTG.

==========================================

Code: Select all

# Memory Monitoring (Total Versus Available Memory in KB)
Target[gw.memory]: memAvailReal.0&memTotalReal.0:public@localhost
Title[gw.memory]: LINUX GW Free Memory in MBytes
PageTop[gw.memory]: <H1>LINUX GW Free Memory in Bytes</H1>
MaxBytes[gw.memory]: 100000000000000
ShortLegend[gw.memory]: B
YLegend[gw.memory]: MB
LegendI[gw.memory]: Free
LegendO[gw.memory]: Total
Legend1[gw.memory]: Free memory
Legend2[gw.memory]: LINUX GW Total memory
Options[gw.memory]: gauge,growright,nopercent
kMG[gw.memory]: k,M,G,T,P,X

# Memory Monitoring (Percentage usage)
Title[gw.mempercent]: LINUX GW Percentage Memory Free in (%)
PageTop[gw.mempercent]: <H1>LINUX GW Percentage Free Memory</H1>
Target[gw.mempercent]: ( memAvailReal.0&memAvailReal.0:public@localhost ) * 100 / ( memTotalReal.0&memTotalReal.0:public@loca$
options[gw.mempercent]: growright, gauge, nopercent, integer
Unscaled[gw.mempercent]: ymwd
MaxBytes[gw.mempercent]: 100
YLegend[gw.mempercent]: Memory %
ShortLegend[gw.mempercent]: Percent
LegendI[gw.mempercent]: Free
LegendO[gw.mempercent]:
Legend1[gw.mempercent]: LINUX GW Percentage Free Memory
Legend2[gw.mempercent]:
==========================================

Result of above MRTG Memory Script is as follows.

Image

Image
Regards,

SYED JAHANZAiB

web: http://aacable.wordpress.com
msn: aacable@hotmail.com
Post Reply