[rrd-users] Matching lines in rrd graph

Alex van den Bogaerdt alex at ergens.op.het.net
Sun Sep 25 16:31:36 MEST 2005


Hi,

I'm hunting some bugs again, this time in SHIFT and LINE.

I found a couple of problems in SHIFT:

#1  There's no debug code in this function. This means that DEBUGSHIFT
    does not work as expected.

#2  The code doesn't verify sscanf results.  This means "1day" is parsed
    as "1", "day" is trown away.  A VDEF with name "1day" cannot be used
    and people who mistakenly believe it is OK do specify "1day" as a
    time specification are very surprised.  Matching "1day" as a VDEF
    name and then finding out that this VDEF doesn't exist would have
    alerted the user.

#3  The type of variable (src in "SHIFT:dst=src:num") isn't verified to
    be DEF or CDEF.  Shifting a VDEF is weird at minimum.


Inside LINE:

I found that "LINE3x:val#color:legend" isn't handled properly.  This is
because "x" after "3" (or any other number) isn't resulting in an error
and eventually a misleading error message pops up:

    Scanning line 'LINE3x:ds0thismonth#FF0000:This month'
    - found function name 'LINE'
    - - using width 3.000000
    - spacecnt: 2 onespace: 7.000000 targspace: 14.000000
    - parsing ':ds0thismonth#FF0000:This month'
    - examining value ''
    - found number: nan
    - no color present in ''
    - parsing 'ds0thismonth#FF0000:This month'
    - skipping empty legend
    ERROR: Legend set but no color: ds0thismonth#FF0000:This month


I'm going to fix these problems but please, when you add/modify code
have a look at how it's done now.

-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list