[mrtg] Correct way to do Target math?
Koelstra, J. (Jan)
JKoelstra at MINSZW.NL
Wed Jul 25 11:32:29 CEST 2007
Ray,
In case you need a zero in the second half of the & statement you can use PseudoZero.
So your targetline woul look like
Target[name]: <oid>&<oid>:public@<ip> - <oid>&PseudoZero:public@<ip>
PseudoOne is also recognized by MRTG (usefull when you want to multiply values...)
One note about using named oid's in mathemetical expressions: In early versions of MRTG the only way to get the right result was by using the full numerical oid's. I don't know if this has changed after MRTG 2.9.x
HTH,
Jan.
-----Original Message-----
From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Ray Van Dolson
Sent: Wednesday, July 25, 2007 2:43 AM
To: mrtg at lists.oetiker.ch
Subject: [mrtg] Correct way to do Target math?
I'm trying to generate a graph using SNMP of actual memory used on a Linux system running Net-SNMP. In theory:
memTotalReal.0 - memBuffer.0 - memCached.0 - memAvailReal.0
Is the real memory available.
I would like to graph this and also memTotalReal.0. I am having a hard time figuring out the right way to do this however... I am currently
using:
Target[memory_used]: memTotalReal.0&memTotalReal.0:public at localhost -
memBuffer.0&memIndex.0:public at localhost -
memCached.0&memIndex.0:public at localhost -
memAvailReal.0&memIndex.0:public at localhost
(Pardon the word wrapping). memIndex.0 evaluates to 0 so that my second variable doesn't continue to get subtracted.
Is there a better way to do this? I tried doing something like:
memTotalReal.0&memTotalReal.0:<stuff> - memBuffer.0&0:<stuff> ....
But this doesn't evaluate. Other than the first group, I just want the second half of the & statement to be 0.
TIA,
Ray
_______________________________________________
mrtg mailing list
mrtg at lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
_________________________________________________________
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.
_________________________________________________________
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The state accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
_________________________________________________________
More information about the mrtg
mailing list