Re: Using a windowed counter
Donovan Baarda <[email protected]> Fri, 16 Jun 2017 11:10:57 +1000
| Newsgroups | gmane.comp.db.rrdtool.user |
|---|---|
| Message-ID | <CAKfm1dvDKFHQmgo+mRtPKQ+CPH=Fj0M2sWZj-ph-LVxAGA5Y9g@mail.gmail.com> |
--===============2458544936427955329== Content-Type: multipart/alternative; boundary="001a114216bc338a5b05520975a1" --001a114216bc338a5b05520975a1 Content-Type: text/plain; charset="UTF-8" Uh... my bad, I miss-read the details. You are right, it's a rainfall per hour rate. I think a pre-filter script to convert your hourly rate back into a counter before feeding it to rrd would be the best option. A little python scripting would probably do it pretty easily. On 14 June 2017 at 09: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. > > > > > > -- Donovan Baarda <[email protected]> --001a114216bc338a5b05520975a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Uh... my bad, I miss-read the details. You are right, it&#= 39;s a rainfall per hour rate.<div><br></div><div>I think a pre-filter scri= pt to convert your hourly rate back into a counter before feeding it to rrd= would be the best option. A little python scripting would probably do it p= retty easily.</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail= _quote">On 14 June 2017 at 09:07, Alex van den Bogaerdt <span dir=3D"ltr">&= lt;<a href=3D"mailto:[email protected]" target=3D"_blank">alex@vandenb= ogaerdt.nl</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span cl= ass=3D"">> A far simpler solution is; it's just a counter that reset= s every hour.<br> <br> </span>No it's not.<br> <br> >> > 011111244445678888889998767777<wbr>76555555344433588888989998= 7677<br> >> > 010000120001121000121000012000<wbr>11000001010001230001101000= 1210<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ------------= <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0------= ------<br> <br> Look approximately halfway:=C2=A0 98767<br> Then look below: 00012<br> <br> The "counter" goes from 7 to 6, as a result of rainfall 1 being a= dded and<br> 2 being removed from the window.<br> <br> If you treat this as a counter being reset every hour, you would get<br> negative rainfall, or counter overflow with the resulting huge flood, or<br= > rates becoming unknown because of sanity checks.<br> <br> <br> <br> <br> <br> </blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class= =3D"gmail_signature" data-smartmail=3D"gmail_signature">Donovan Baarda <= <a href=3D"mailto:[email protected]" target=3D"_blank">abo@minkirri= .apana.org.au</a>></div> </div> --001a114216bc338a5b05520975a1-- --===============2458544936427955329== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users --===============2458544936427955329==--