[rrd-users] Bug in rrdtool xport?

"Peter Valdemar Mørch (Lists)" 4ux6as402 at sneakemail.com
Tue Sep 9 11:26:27 CEST 2008


I'm have two rrd files with different steps. I try to "see" three 
values: a DEF from each of these files, and a CDEF which is an average 
of each of them. It seems rrdtool graph does it "right", but rrdtool 
xport does it "wrong". Do you agree?

In my reproducing script
http://www.morch.com/misc/rrdxport_bug/REPRODUCE.sh.txt
there are similar lines for graph and xport. Here graph:

rrdtool graph --start 1220625000 --end 1220629800 ok.png \
DEF:ns3=snmp2-0.rrd:ns3:AVERAGE 'LINE1:ns3#0000ff:ns3' \
DEF:ns4=snmp3-0.rrd:ns4:AVERAGE 'LINE1:ns4#ff0000:ns4' \
CDEF:avg=ns3,ns4,+,2,/          'LINE2:avg#00ff00:avg'

( Both the required RRD files + samle output are in:
http://www.morch.com/misc/rrdxport_bug/ )

rrdtool graph shows these values "correctly":
http://www.morch.com/misc/rrdxport_bug/ok.png

But as far as I can tell, rrdtool xport does not:
http://www.morch.com/misc/rrdxport_bug/wrong.xml

E.g. I would expect that exactly if either of the components (either of 
the two DEFs) are NaN, so would the average, but that seems not to be 
the case. Here are two example rows from wrong.xml:

<row><t>1220627400</t><v>1.3481197778e+02</v><v>3.6073928446e-313</v><v>NaN</v></row>
<row><t>1220626800</t><v>2.0573415556e+02</v><v>NaN</v><v>1.4496235778e+03</v></row>

Also, the value of ns4 in the xport output is wrong when not NaN. I 
would have expected, that
http://www.morch.com/misc/rrdxport_bug/wrong.xml
only contain values of ns4 that are also present in
http://www.morch.com/misc/rrdxport_bug/good.xml which agrees with the 
values in ok.png above.

It sure looks to me like ok.png and wrong.xml disagree on what to show. 
And that ok.png/good.xml are "right". Do you agree?

If this is a bug, should I file it in trac? I seem not to be able to 
create new bugs or register, only query existing bugs... Please let me 
know how if you want me to file a bug report.

Peter
-- 
Peter Valdemar Mørch
http://www.morch.com



More information about the rrd-users mailing list