[mrtg] Convert temperature from C to F

Lyle Giese lyle at lcrcomputer.net
Wed Dec 16 20:16:16 CET 2009


I have some APC SmartUPS's that I monitor with MRTG(I have SNMP cards in
them).  I live in the US and we normally look at temperature in F.  I am
running mrtg in rrd mode now and using routers2.cgi  

I know the math can be done using this formula  (((temp / 5) * 9) + 32),
but the data in the rrd databases is already in C and if I apply this to
the data as it's gathered, then the temperature is stored in F instead. 
Not my first choice.  Also, am not 100% certain that if I just put / 5 *
9 + 32, would that be applied to the data properly?  This is not
something I want to play with on the fly here without some other opinions.

Or is there a way to apply the conversion to the graphs as they are
generated to convert from C to F? 


Thanks,
Lyle Giese



More information about the mrtg mailing list