[mrtg] math in Target

Koelstra, J. (Jan) JKoelstra at MINSZW.NL
Mon Mar 10 11:49:20 CET 2008

There are 2 ways to tackle this:

1. Have the maths on the targetline:
Target[daw1_temps]: . at daw1&. at daw1 / 1000
(note: the same maths are always done on both values)
The disadvantage for this method: Your temperature graph will show steps of 1 degree. (MRTG rounds fractions down) The values stored in the .log file are the rounded down values.

2. Use both the 'factor' and 'YTicsFatcor' option:
Factor[daw1_temps]: 0.001
YTicsFactor[daw1_temps]: 0.001



-----Original Message-----
From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of R Dicaire
Sent: Sunday, March 09, 2008 12:41 AM
To: mrtg at lists.oetiker.ch
Subject: [mrtg] math in Target

Hi...I'm pulling data via snmp that returns a 5 char result:

UCD-SNMP-MIB::ucdExperimental. = Gauge32: 39000

This is CPU temperature. My target gets CPU and motherboard temps, both return 5 char as results. I'm trying to perform math on these results but it looks like I don't understand the docs on how this is performed. My target line:

Target[daw1_temps]: . at daw1 / 1000 &. at daw1 / 1000

(Forgive any linewrapping, I have left the requisite white space around the math expr)

Is this not possible on the target line, or must some other means be used to get the desired result, and if so, how? Thanks

aRDy Music and Rick Dicaire present:
http://www.ardynet.com http://www.ardynet.com:9000/ardymusic.ogg.m3u

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