Re: [rrd-users] Fw: Aw: Re: Empty sections in AREA on graph, but values in database
- Original Message - From: "Thomas Brinkmann" To: "list rrdtool" Sent: Wednesday, August 27, 2014 12:00 PM Subject: [rrd-users] Fw: Aw: Re: Empty sections in AREA on graph, but values in database > Try adding: CDEF:stufe_debug=stufe,UN,75,stufe,IF - I have removed alles DEFs and CDEF as mentioned and then added the - DEF:stufe_debug=stufe,UN,75,stufe,IF ??? Does this even seem to work? It clearly is not what I suggested to do as a next debugging step. I suggested to make a CDEF, not a DEF. - the line then draws at 75 - so there must be unknown data? - GPRINT stufe_debug is 75.00 IF A then B else C. A is set to: {stufe,UN} which returns true if stufe is unknown. B is set to 75, which is returned if A is true If the entire line is at 75, then stufe is unknown during the entire time. CDEF:stufe_debug=10,stufe,25,*,stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ,+,+,+,IF (by the way: everything is untested, you make it work should changes be required) I got the order wrong. CDEF:stufe_debug=stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ,+,+,+,10,stufe,25,*,IF ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
[rrd-users] Aw: Re: Empty sections in AREA on graph, but values in database
Sorry, typo - it was of course CDEF instead DEF. "CDEF:stufe_debug=stufe,UN,75,stufe,IF" --> Result is 75 in the graph With the order "CDEF:stufe_debug=stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ,+,+,+,10,stufe,25,*,IF" --> Result ist "10" in the graph - one straight line. Currently, stufe is "2". Gesendet: Donnerstag, 28. August 2014 um 09:32 Uhr Von: "Alex van den Bogaerdt" An: "list rrdtool" Betreff: Re: [rrd-users] Fw: Aw: Re: Empty sections in AREA on graph, but values in database - Original Message - From: "Thomas Brinkmann" To: "list rrdtool" Sent: Wednesday, August 27, 2014 12:00 PM Subject: [rrd-users] Fw: Aw: Re: Empty sections in AREA on graph, but values in database > > Try adding: CDEF:stufe_debug=stufe,UN,75,stufe,IF > > - I have removed alles DEFs and CDEF as mentioned and then added the > - DEF:stufe_debug=stufe,UN,75,stufe,IF ??? Does this even seem to work? It clearly is not what I suggested to do as a next debugging step. I suggested to make a CDEF, not a DEF. > - the line then draws at 75 - so there must be unknown data? > - GPRINT stufe_debug is 75.00 IF A then B else C. A is set to: {stufe,UN} which returns true if stufe is unknown. B is set to 75, which is returned if A is true If the entire line is at 75, then stufe is unknown during the entire time. > CDEF:stufe_debug=10,stufe,25,*,stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ,+,+,+,IF > (by the way: everything is untested, you make it work should changes be > required) I got the order wrong. CDEF:stufe_debug=stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ,+,+,+,10,stufe,25,*,IF ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph, but values in database
Out of interest, what happens if you simply add a cdef for stufe*100 (CDEF:stufe2=stufe,100,*) and plot a line for that ? I'd expect to see an almost straight line at 100, 200, or 300. Remove the plot commands for the other stuff and the autoscaling should show (say) 99 to 101 or something like that which would accentuate any "wobble". My guess is that internal maths and rounding means that you don't get exactly 1, 2, 3 - could be 0.99 or 1.01 for example. I'd be tempted to re-write the code like this : CDEF:stufe0_flag=stufe,0.5,LT,INF,UNKN,IF CDEF:stufe1_flag=stufe,0.5,GE,INF,UNKN,IF CDEF:stufe2_flag=stufe,1.5,GE,INF,UNKN,IF CDEF:stufe3_flag=stufe,2.5,GE,INF,UNKN,IF AREA:stufe0_flag#7c6767:Stufe 0 AUS \\t AREA:stufe1_flag#98FB98:Stufe 1 \\t AREA:stufe2_flag#fafa78:Stufe 2 \\t AREA:stufe3_flag#fd6969:Stufe 3 \\t This would also mean that your graph would work after consolidation of data. Eg, at present, if you graph over (say) a week instead of a day, then there will be periods where the values is changing between (say) 1 & 2 and the result will be 1.something for that consolidated period. Using equality comparisons, these values won't math anything, but using comparative statements, it'll show as 1 if the consolidated value is less than 1.5 and 2 if it's over that. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph, but values in database
- Original Message - From: "Thomas Brinkmann" To: "list rrdtool" Sent: Thursday, August 28, 2014 11:03 AM Subject: [rrd-users] Aw: Re: Empty sections in AREA on graph, but values in database Sorry, typo - it was of course CDEF instead DEF. ack With the order "CDEF:stufe_debug=stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ,+,+,+,10,stufe,25,*,IF" --> Result ist "10" in the graph - one straight line. Currently, stufe is "2". Which means, currently, "stufe,1,EQ,stufe,2,EQ,stufe,3,EQ,stufe,0,EQ" matches from start to end. What is really interesting is to see what the original graph shows, everything else being the same. If that graph still shows the empty parts, then there is no relationship between those and your original CDEF. I'm starting to believe the problem is not in your RPN and not in your data at all. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph, but values in database
Hello Simon, this is working :-) so this must really be a internal math and rounding issue. Thanks for all you help! Gesendet: Donnerstag, 28. August 2014 um 11:23 Uhr Von: "Simon Hobson" An: "Thomas Brinkmann" Cc: "list rrdtool" Betreff: Re: [rrd-users] Empty sections in AREA on graph, but values in database Out of interest, what happens if you simply add a cdef for stufe*100 (CDEF:stufe2=stufe,100,*) and plot a line for that ? I'd expect to see an almost straight line at 100, 200, or 300. Remove the plot commands for the other stuff and the autoscaling should show (say) 99 to 101 or something like that which would accentuate any "wobble". My guess is that internal maths and rounding means that you don't get exactly 1, 2, 3 - could be 0.99 or 1.01 for example. I'd be tempted to re-write the code like this : CDEF:stufe0_flag=stufe,0.5,LT,INF,UNKN,IF CDEF:stufe1_flag=stufe,0.5,GE,INF,UNKN,IF CDEF:stufe2_flag=stufe,1.5,GE,INF,UNKN,IF CDEF:stufe3_flag=stufe,2.5,GE,INF,UNKN,IF AREA:stufe0_flag#7c6767:Stufe 0 AUS \\t AREA:stufe1_flag#98FB98:Stufe 1 \\t AREA:stufe2_flag#fafa78:Stufe 2 \\t AREA:stufe3_flag#fd6969:Stufe 3 \\t This would also mean that your graph would work after consolidation of data. Eg, at present, if you graph over (say) a week instead of a day, then there will be periods where the values is changing between (say) 1 & 2 and the result will be 1.something for that consolidated period. Using equality comparisons, these values won't math anything, but using comparative statements, it'll show as 1 if the consolidated value is less than 1.5 and 2 if it's over that. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph, but values in database
Thomas Brinkmann wrote: > this is working :-) Good news > so this must really be a internal math and rounding issue. I'm thinking that unless your graph has *exactly* one pixel per data point, then there is data manipulation going on. Say a pixel takes in a little over a data point - lets say 1.27 data points/pixel, and for simplicity, we'll say the start point is the same so only "one end" is subject to calculation. Assume both data points contain exactly 1.0, the calculation would be : x=(1/1.27) + ( (0.27*1)/1.27) or x=( 1 + (0.27*1) )/1.27 In practice, the start of the pixel probably doesn't line up with the start of the data point, so the calculation is more likely to be something like : x=( (0.15*1) + 1 + (0.12*1) )/1.27 Since the maths is done with finite precision, you can now see why even feeding in a steady stream of "exactly 1.0", you might not get out exactly 1.00. More importantly, you might get out something which (after truncation/rounding) displays as 1.000 but which does not (internally) equate to 1.0 I recall (cough) years ago when first learning about computers and programming, the teacher showed the effects of limited precisions very simply. This was in the days of BASIC, and we were told to write a short loop to count from 0 to 1 in steps of 1/100 (or something like that). Of course we all did : for a = 0 to 1 step 0.01 print a next a Needless to say, at some point we ended up with rounding errors and the final value was not 1 but typically something like 0.. The simple reason being that decimal fractions (other than 0.5, 0.25, 0.125, and so on) don't have an *exact* representation in binary floating point. While iterating multiple times, these errors accumulate. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph, but values in database
I'm thinking that unless your graph has *exactly* one pixel per data point, which i think i covered in my email august 27, 10:30 CEST. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph
This gives me the idea for some new RPN functions in RRDtool -- ROUND -- pops top element from stack, replaces with closest integer (to go with the existing FLOOR and CEIL) x,a,b,INRANGE -- push TRUE onto stack if a<=x<=b, FALSE otherwise(or call it 'BETWEEN'?) Maybe I will brave github again and code them up... Steve Steve Shipway s.ship...@auckland.ac.nz smime.p7s Description: S/MIME cryptographic signature ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] Empty sections in AREA on graph
- Original Message - From: "Steve Shipway" To: "list rrdtool" Sent: Friday, August 29, 2014 12:06 AM Subject: Re: [rrd-users] Empty sections in AREA on graph This gives me the idea for some new RPN functions in RRDtool -- ROUND -- pops top element from stack, replaces with closest integer (to go with the existing FLOOR and CEIL) I believe there are a couple conventions to choose from. What is the closest integer to 5.5 ? And what is the closest integer to 6.5 ? Some will say the answer is 6 to both questions, others will say 6 and 7. x,a,b,INRANGE -- push TRUE onto stack if a<=x<=b, FALSE otherwise(or call it 'BETWEEN'?) You can probably share a lot of code with LIMIT. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users