[mrtg] Problem with MRTG 2.9.10 log file and decimals

Chris Thomas CThomas at ucla.edu
Tue Apr 3 22:02:55 MEST 2001


I am having a problem with decimal values in the MRTG log file and hope one 
of you gurus can tell me what I am doing wrong.

I am running traditional MRTG 2.9.10 under Windows NT 4 (SP6), and my Perl 
is Active's 5.005_03.  I am attempting to monitor the temperature of a 
Cisco 6509.  When I use the Celisus values directly from the 6509, 
everything works just fine, and as I expect.

However, when I attempt to convert the values to from C to F by appending 
to the Target[] line * 1.8 + 32, I have a problem.  When I use * 9 / 5 + 
32, I have the same problem.  When I use * 2 + 32, the problem goes away 
(but I don't get the correct temperature, obviously).

The problem seems to be related to the fact that * 1.8 results in a 
fractional value.  For example, 28C = 82.4F.  This seems to fail the 
MaxBytes compare, and the value is considered invalid and not entered in 
the log file.  The log file instead propagates the last good value (default 
behavior), in this case 0. Can anyone tell me what I'm doing wrong, or how 
to fix it.

log file:

986327405 80.6 109.4
986327405 0 0 0 0
986327107 0 0 0 0
986327100 0 0 0 0
986326800 0 0 0 0
986326500 0 0 0 0

mrtg.cfg

Target[6509temp1]: 
1.3.6.1.4.1.9.9.91.1.1.1.1.4.4001&1.3.6.1.4.1.9.9.91.1.1.1.1.4.4002:public at 128.97.232.102
    * 1.8 + 32
RouterUptime[6509temp1]: public at 128.97.232.102
YLegend[6509temp1]: Degrees F
ShortLegend[6509temp1]: °F
MaxBytes[6509temp1]: 160
Options[6509temp1]: nopercent, growright, gauge
Unscaled[6509temp1]: dwmy
AbsMax[6509temp1]: 160
Title[6509temp1]: 6509temp1
Legend1[6509temp1]: Average 5 minute Inlet Temp - Slot 2
Legend2[6509temp1]: Average 5 minute Outlet Temp - Slot 2
LegendI[6509temp1]:  Inlet:
LegendO[6509temp1]:  Outlet:
PageTop[6509temp1]: <H1> 6509 Temperature (Slot 2) - Degrees F
  <BR></H1>
  <TABLE>
    <TR><TD>System:</TD><TD>Cisco 6509</TD></TR>
    <TR><TD>Maintainer:</TD><TD>Chris Thomas</TD></TR>
   </TABLE>



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list