Page 1 of 1

Odd time readings on Realtime Gauges

Posted: Wed 21 Sep 2016 10:36 am
by scanman
This is not a major issue by any means, but I was wondering whether someone can explain why I sometimes get these odd readings on my realtime gauges page? I am using Cumulus MX and SS gauges 2.5.5 updating at 7sec intervals. Sometimes I get negative figures, too! :D
odd.jpg

Re: Odd time readings on Realtime Gauges

Posted: Wed 21 Sep 2016 10:56 am
by mcrossley
It happens when the script fails to download the realtimegauges.txt file for some reason. The error handling is fairly primitive, but the possible ways it can fail are many! The normal cause is the file is being written to when the script attempts to read it. The faster your update time the more likely this is to happen.

Mitigations: Use the FTP rename option in Cumulus if it works for your server. Use the slow polling option if you have PHP.

Or you can wait for me to sort out some better error handling! I had a couple of goes at it, and it still isn't foolproof! :groan:

Re: Odd time readings on Realtime Gauges

Posted: Wed 21 Sep 2016 11:07 am
by scanman
Thanks for your answer. As I said, it was more out of curiosity than anything else as it doesn't happen all the time and is easily remedied by refreshing the page.

I did wonder as to whether the update rate was a factor, as it was occasionally happening on a 5 second upload interval, but I also noticed it would sometimes happen on a 10 second upload interval, though less often. I thought that 7 seconds might be a reasonable compromise!