[rrd-developers] Re: Bug with CDEF processing
Mike McHenry
mmchenry at origix.net
Fri Feb 1 23:28:51 MET 2002
Ok, I think I have somewhat answered my own question. The bug appears to
be located in this diff of code between CVS-2001-10-24 and
CVS-2001-10-25, line 777 of the rrd_graph.c code.
diff -uNr rrdtool.good/src/rrd_graph.c rrdtool.bad/src/rrd_graph.c
--- rrdtool.good/src/rrd_graph.c Fri Dec 21 20:49:23 2001
+++ rrdtool.bad/src/rrd_graph.c Mon Dec 24 00:51:49 2001
@@ -777,8 +791,7 @@
* further save step size and data source
* count of this rra
*/
- im->gdes[gdi].rpnp[rpi].data =
- im->gdes[ptr].data +
im->gdes[ptr].ds;
+ im->gdes[gdi].rpnp[rpi].data =
im->gdes[ptr].data;
im->gdes[gdi].rpnp[rpi].step =
im->gdes[ptr].step;
im->gdes[gdi].rpnp[rpi].ds_cnt =
im->gdes[ptr].ds_cnt;
Anyone comments? Without this patch the CDEF problems that I commented
on below go away...
Mike McHenry
Senior Network Engineer
Origix Corp.
-----Original Message-----
From: Mike McHenry
Sent: Friday, February 01, 2002 1:32 PM
To: rrd-developers at list.ee.ethz.ch
Subject: [rrd-developers] Bug with CDEF processing
I have been beating my head over this one but there appears to be a bug
in the way CDEF statements are processed in the current code base. I
have looked back and this bug seems to have been introduced on
12/25/2001.
Basically appears to happen is that multiple CDEF definitions seem to be
blending the variables together. For example, take a simple database
with two sets of variables in it and run the following command....
rrdtool graph /tmp/test.gif -s 1012261801 -e 1012278000 \
DEF:input=database.rrd:input:AVERAGE \
DEF:output=database.rrd:output:AVERAGE \
CDEF:inputBits=input \
CDEF:outputBits=output \
GPRINT:input:AVERAGE:"Input average %1.2lf" \
GPRINT:output:AVERAGE:"Output average %1.2lf"
What seems to happen is that the two CDEF statements somehow seem to
become intertwined and end up being printed as the same value in the
final GPRINT statements (even though the datasets are definitely not the
same values). This appears to be a bug in the CDEF code and I am
wondering if anyone has any input or can point me in the right
direction.
I have narrowed down the bug to something that was introduced on
12/25/2001. The 12/24/2001 CVS code does not exhibit this problem. It
looks like the patch between the two versions was pretty significant so
I am at a little bit of a loss as to where to start looking for the
problems. Any suggestions would be appreciated, thanks!
Mike McHenry
Senior Network Engineer
Origix Corp.
--
Unsubscribe
mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list