Re: Using a windowed counter
Marcelo Pasin <[email protected]> Thu, 15 Jun 2017 13:05:22 +0200
| Newsgroups | gmane.comp.db.rrdtool.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks everyone for the answers, especially Alex for the long one. :-) I will then write my own (window) interpreter for my rain gauge values. Thanks! MP > On 14 Jun 2017, at 01:07, Alex van den Bogaerdt <[email protected]> wrote: > >> A far simpler solution is; it's just a counter that resets every hour. > > No it's not. > >>>> 011111244445678888889998767777765555553444335888889899987677 >>>> 010000120001121000121000012000110000010100012300011010001210 > ------------ > ------------ > > Look approximately halfway: 98767 > Then look below: 00012 > > The "counter" goes from 7 to 6, as a result of rainfall 1 being added and > 2 being removed from the window. > > If you treat this as a counter being reset every hour, you would get > negative rainfall, or counter overflow with the resulting huge flood, or > rates becoming unknown because of sanity checks. > > > > >