Re: [rrd-users] LAST always returning zero

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 ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-08-2008
Wes
 
Posts: n/a
Default Re: [rrd-users] LAST always returning zero

> 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 &quot;last / 10 * 10&quot; returns *720, the g=
raph/fetch tool returns me through *730 instead of *720. &nbsp;See the first=
rrdfetch below - I still get a nan.<BR>
<BR>
No problem - I'll just subtract a couple of seconds. &nbsp;Now I get exactl=
y the data I'm after. &nbsp;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. &nbsp;The queue2_enabled is inverted from a 0 to a 1 and GPRINT prints it=
correctly. &nbsp;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. &nbsp;It is just the GPRINT that is randomly wrong=
.. &nbsp;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 &quot=

;Disabled Queues (mmp11es)&quot; \<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:&quot;MTA-SunSecure-In-Polic&quot; \<BR>
GPRINT:queue1L:'%1.0lf' \<BR>
AREA:queue2N#0000FF:&quot;MTA-SunSecure-In-sendm&quot;:STACK \<BR>
GPRINT:queue2L:'%1.0lf' \<BR>
GPRINT:queue9L:'%1.0lf' \<BR>
--upper-limit 10 --vertical-label &quot;xDisabled Queue Count&quot; -w 400 =
-h 100 -s &nbsp;&quot;now-2h&quot; -e &quot;1204935598&quot;<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE=3D"Arial"><SPAN STYLE=3D'font-size:12.0px=
'>'end' is defined as: &nbsp;“int (`$RRDTOOL last $rrdFile` &nbsp;/ 10=
) * 10” <BR>
<BR>
<BR>
Sample rrdfetch and debug output. &nbsp;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>
&nbsp;&nbsp;--end specifies 720, but rrdfetch returns through 730. &nbsp;0 =
expected.<BR>
<BR>
<BR>
rrdtool last: 1204934725<BR>
rounded end=3D1204934720<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_dept h &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;queue1_added &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_removed =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_enabled &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;queue2_depth &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_a dd=
ed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_removed &nbsp;&nbsp;&nbsp;&nbsp;&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: &nbsp;“int (`$RRDTOOL last $rrdFile` &nbsp;/ 10)=
* 10 – 2”. &nbsp;Now it returns the correct data.<BR>
<BR>
Returns 1:<BR>
<BR>
rrdtool last: 1204934846<BR>
rounded end=3D1204934838<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_dept h &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;queue1_added &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_removed =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_enabled &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;queue2_depth &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_a dd=
ed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_removed &nbsp;&nbsp;&nbsp;&nbsp;&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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_dept h &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;queue1_added &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_removed =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_enabled &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;queue2_depth &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_a dd=
ed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_removed &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;queue2_enabled<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_dept h &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;queue1_added &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_removed =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_enabled &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;queue2_depth &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_a dd=
ed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_removed &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;queue2_enabled<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_dept h &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;queue1_added &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_removed =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue1_enabled &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;queue2_depth &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_a dd=
ed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue2_removed &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;queue2_enabled<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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==--


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:33 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0