This is a discussion on Re: [rrd-users] LAST always returning zero within the RRD Users forums, part of the Networking and Network Related category; > This message is in MIME format. Since your mail reader does not understand this format, some or all of ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible. --===============2097206994== Content-Type: multipart/alternative; boundary="B_3287759938_29450830" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3287759938_29450830 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable I thought it was working with the last changes suggested by Alex, but still not quite there. The first problem is that if "last / 10 * 10" returns *720, the graph/fetch tool returns me through *730 instead of *720. See the first rrdfetch below - I still get a nan. No problem - I'll just subtract a couple of seconds. Now I get exactly the data I'm after. However, GPRINT still randomly prints 0 instead of 1. In the data below, examples 2 and 5 print the correct value of 1 for queue 2. The queue2_enabled is inverted from a 0 to a 1 and GPRINT prints it correctly. In examples 3 and 4, the data is identical, but GPRINT prints a 0 instead of a 1. The graph looks perfect. It is just the GPRINT that is randomly wrong. An= y other ideas? Wes The command, keeping only the first two queues: > /usr/local/rrdtool/bin/rrdtool graph /docs/enabled.png -a PNG -l 0 -t > "Disabled Queues (mmp11es)" \ > DEF:queue1=3D/var/log/test.rrd:queue1_enabled:AVERAGE \ > DEF:queue2=3D/var/log/test.rrd:queue2_enabled:AVERAGE \ > CDEF:queue1N=3Dqueue1,UN,1,queue1,IF,0,GT,0,1,IF \ > VDEF:queue1L=3Dqueue1N,LAST \ > CDEF:queue2N=3Dqueue2,UN,1,queue2,IF,0,GT,0,1,IF \ > VDEF:queue2L=3Dqueue2N,LAST \ > AREA:queue1N#00FF00:"MTA-SunSecure-In-Polic" \ > GPRINT:queue1L:'%1.0lf' \ > AREA:queue2N#0000FF:"MTA-SunSecure-In-sendm":STACK \ > GPRINT:queue2L:'%1.0lf' \ > GPRINT:queue9L:'%1.0lf' \ > --upper-limit 10 --vertical-label "xDisabled Queue Count" -w 400 -h 100 -= s > "now-2h" -e "1204935598" >=20 'end' is defined as: =B3int (`$RRDTOOL last $rrdFile` / 10) * 10=B2 Sample rrdfetch and debug output. Rrdfetch is using the same --end rrdgraph. In this one, GPRINT prints 0 instead of the correct 1. --end specifies 720, but rrdfetch returns through 730. 0 expected. rrdtool last: 1204934725 rounded end=3D1204934720 queue1_depth queue1_added queue1_removed queue1_enabled queue2_depth queue2_added queue2_removed queue2_enabled=20 1204934700: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1204934710: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1204934720: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1204934730: nan nan nan nan nan nan nan nan 'end' is defined as: =B3int (`$RRDTOOL last $rrdFile` / 10) * 10 =AD 2=B2. Now it returns the correct data. Returns 1: rrdtool last: 1204934846 rounded end=3D1204934838 queue1_depth queue1_added queue1_removed queue1_enabled queue2_depth queue2_added queue2_removed queue2_enabled 1204934820: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934830: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934840: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 Same data, but GPRINT displays =8C0=B9. rrdtool last: 1204934876 rounded end=3D1204934868 queue1_depth queue1_added queue1_removed queue1_enabled queue2_depth queue2_added queue2_removed queue2_enabled =20 1204934850: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934860: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934870: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 Another 0 from GPRINT: rrdtool last: 1204934996 rounded end=3D1204934988 queue1_depth queue1_added queue1_removed queue1_enabled queue2_depth queue2_added queue2_removed queue2_enabled =20 1204934960: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934970: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934980: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 1204934990: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00=20 This time GPRINT correctly displays 1: rrdtool last: 1204935107 rounded end=3D1204935098 queue1_depth queue1_added queue1_removed queue1_enabled queue2_depth queue2_added queue2_removed queue2_enabled =20 1204935080: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1204935090: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1204935100: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 --B_3287759938_29450830 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable <HTML> <HEAD> <TITLE>Re: [rrd-users] LAST always returning zero</TITLE> </HEAD> <BODY> <FONT FACE=3D"Arial"><SPAN STYLE=3D'font-size:12.0px'>I thought it was working = with the last changes suggested by Alex, but still not quite there.<BR> <BR> The first problem is that if "last / 10 * 10" returns *720, the g= raph/fetch tool returns me through *730 instead of *720. See the first= rrdfetch below - I still get a nan.<BR> <BR> No problem - I'll just subtract a couple of seconds. Now I get exactl= y the data I'm after. However, GPRINT still randomly prints 0 instead = of 1.<BR> <BR> In the data below, examples 2 and 5 print the correct value of 1 for queue = 2. The queue2_enabled is inverted from a 0 to a 1 and GPRINT prints it= correctly. In examples 3 and 4, the data is identical, but GPRINT pri= nts a 0 instead of a 1.<BR> <BR> The graph looks perfect. It is just the GPRINT that is randomly wrong= .. Any other ideas?<BR> <BR> Wes<BR> <BR> <BR> The command, keeping only the first two queues:<BR> <BR> </SPAN></FONT><BLOCKQUOTE><FONT FACE=3D"Arial"><SPAN STYLE=3D'font-size:12.0px'= >/usr/local/rrdtool/bin/rrdtool graph /docs/enabled.png -a PNG -l 0 -t "= ;Disabled Queues (mmp11es)" \<BR> DEF:queue1=3D/var/log/test.rrd:queue1_enabled:AVERAGE \<BR> DEF:queue2=3D/var/log/test.rrd:queue2_enabled:AVERAGE \<BR> CDEF:queue1N=3Dqueue1,UN,1,queue1,IF,0,GT,0,1,IF \<BR> VDEF:queue1L=3Dqueue1N,LAST \<BR> CDEF:queue2N=3Dqueue2,UN,1,queue2,IF,0,GT,0,1,IF \<BR> VDEF:queue2L=3Dqueue2N,LAST \<BR> AREA:queue1N#00FF00:"MTA-SunSecure-In-Polic" \<BR> GPRINT:queue1L:'%1.0lf' \<BR> AREA:queue2N#0000FF:"MTA-SunSecure-In-sendm":STACK \<BR> GPRINT:queue2L:'%1.0lf' \<BR> GPRINT:queue9L:'%1.0lf' \<BR> --upper-limit 10 --vertical-label "xDisabled Queue Count" -w 400 = -h 100 -s "now-2h" -e "1204935598"<BR> <BR> </SPAN></FONT></BLOCKQUOTE><FONT FACE=3D"Arial"><SPAN STYLE=3D'font-size:12.0px= '>'end' is defined as: “int (`$RRDTOOL last $rrdFile` / 10= ) * 10” <BR> <BR> <BR> Sample rrdfetch and debug output. Rrdfetch is using the same --end &n= bsp;rrdgraph.<BR> <BR> <BR> In this one, GPRINT prints 0 instead of the correct 1.<BR> <BR> --end specifies 720, but rrdfetch returns through 730. 0 = expected.<BR> <BR> <BR> rrdtool last: 1204934725<BR> rounded end=3D1204934720<BR> &n bsp; &nb= sp; queue1_dept h = queue1_added queue1_removed = queue1_enabled &= nbsp; queue2_depth queue2_a dd= ed queue2_removed &nbs= p;queue2_enabled <BR> 1204934700: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00<BR> 1204934710: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00<BR> 1204934720: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00<BR> 1204934730: nan nan nan nan nan nan nan nan<BR> <BR> <BR> 'end' is defined as: “int (`$RRDTOOL last $rrdFile` / 10)= * 10 – 2”. Now it returns the correct data.<BR> <BR> Returns 1:<BR> <BR> rrdtool last: 1204934846<BR> rounded end=3D1204934838<BR> &n bsp; &nb= sp; queue1_dept h = queue1_added queue1_removed = queue1_enabled &= nbsp; queue2_depth queue2_a dd= ed queue2_removed &nbs= p;queue2_enabled<BR> <BR> 1204934820: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934830: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934840: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > <BR> <BR> Same data, but GPRINT displays ‘0’.<BR> <BR> rrdtool last: 1204934876<BR> rounded end=3D1204934868<BR> &n bsp; &nb= sp; queue1_dept h = queue1_added queue1_removed = queue1_enabled &= nbsp; queue2_depth queue2_a dd= ed queue2_removed &nbs= p;queue2_enabled<BR> &n bsp; &nb= sp; <BR> 1204934850: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934860: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934870: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > <BR> <BR> Another 0 from GPRINT:<BR> <BR> rrdtool last: 1204934996<BR> rounded end=3D1204934988<BR> &n bsp; &nb= sp; queue1_dept h = queue1_added queue1_removed = queue1_enabled &= nbsp; queue2_depth queue2_a dd= ed queue2_removed &nbs= p;queue2_enabled<BR> &n bsp; &nb= sp; <BR> 1204934960: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934970: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934980: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > 1204934990: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 <BR= > <BR> <BR> This time GPRINT correctly displays 1:<BR> <BR> rrdtool last: 1204935107<BR> rounded end=3D1204935098<BR> &n bsp; &nb= sp; queue1_dept h = queue1_added queue1_removed = queue1_enabled &= nbsp; queue2_depth queue2_a dd= ed queue2_removed &nbs= p;queue2_enabled<BR> &n bsp; &nb= sp; <BR> 1204935080: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00<BR> 1204935090: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00<BR> 1204935100: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.0000000000= e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00<BR> </SPAN></FONT> </BODY> </HTML> --B_3287759938_29450830-- --===============2097206994== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users --===============2097206994==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|