| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Storing/Displaying negative temperature values http://www.steveshipway.org/forum/viewtopic.php?f=15&t=8086 |
Page 1 of 1 |
| Author: | gerch_winnheuer [ Sat Jan 12, 2013 1:30 am ] |
| Post subject: | Storing/Displaying negative temperature values |
Hi guys, I want to know whether someone has a best practice for storing and displaying negative temperature values? I know that MRTG and RRD do not store negative values. But maybe it is possible to add a constant value (lets say: +100) to the gathered values in the extended script, and let routers2.cgi know that it should interpret them as values with -100. For example: a temperature of 20 °C is stored as 120, while a temperature of -10 °C is stored as 90. However, I am just interested if someone has ever made something like this, or if I should try to find some other software that fits my aims. Here is an example of my daily temperature graph. Last night, the temperature was under 0 °C. Temperature.cfg-localtemp-d-l2.png [ 27.68 KiB | Viewed 11257 times ] |
|
| Author: | stevesh [ Tue Jan 15, 2013 1:47 pm ] |
| Post subject: | Re: Storing/Displaying negative temperature values |
RRD is capabile of storing negative values; and Router2 can display them fine. However, MRTG will create RRD files with a minumum vales of 0 and max value of MaxBytes[], so an MRTG plugin (or SNMP OID) with a negative value will be stored as 'unknown'. What you can do is to manually tune the RRD file (using rrdtool tune) to set the minimum value of the temperature DS to something like -100 instead of 0, and then the vlaues should store correctly. There is no need to offset the values (though you could do this by using ' + 100' on the end of the Target definition and then using ScaleShift to print the graph line at an offset....) |
|
| Author: | gerch_winnheuer [ Thu Jan 24, 2013 4:17 am ] |
| Post subject: | Re: Storing/Displaying negative temperature values |
| Author: | stevesh [ Tue Jan 29, 2013 4:39 pm ] |
| Post subject: | Re: Storing/Displaying negative temperature values |
You're right, this should probably be in the book. The next edition is going to have a lot on using rrdcached, so I can add this as well. Steve |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|