[rrd-users] CDEF problem
Ashok Mandala
chakri063 at yahoo.com
Thu Mar 14 01:10:40 MET 2002
Hi everyone,
I am trying to use CDEF statements in creating a
rrdtool graph for displaying a single line based on
two different values from two rrd files. Basically,
the second value should be drawn unless it is UNKNOWN,
in which case the first value should be used. I am not
sure if the CDEF evaluation is proceeding correctly or
if there is some bug. Here are the rrd statements for
the creation/updation of the rrds. I expected the
graph in the CDEF case to be a straight line, then a
small spike and then continue to be straight.
rrdtool create test_a.rrd --start 1016049600 --step
3600 DS:a:GAUGE:7200:0:U RRA:AVERAGE:0.5:1:48
rrdtool update test_a.rrd --template a 1016053200:15
rrdtool create test_b.rrd --start 1016052600 --step 30
DS:b:GAUGE:60:0:U RRA:AVERAGE:0.5:1:720
rrdtool update test_b.rrd --template b 1016052630:5
rrdtool update test_b.rrd --template b 1016052660:7
rrdtool update test_b.rrd --template b 1016052690:9
I then created three graphs one each for "plain" "a"
and "b" DS'es and one with the CDEF.
rrdtool graph a.gif --start 1016049600 --end
1016053200 DEF:val1=test_a.rrd:a:AVERAGE
LINE2:val1#FF0000:a
rrdtool graph b.gif --start 1016049600 --end
1016053200 DEF:val1=test_b.rrd:b:AVERAGE
LINE2:val1#00FF00:b
rrdtool graph ab.gif --start 1016049600 --end
1016053200 DEF:val1=test_a.rrd:a:AVERAGE
DEF:val2=test_b.rrd:b:AVERAGE
CDEF:val3=val2,UN,val1,val2,IF LINE2:val3#0000FF:ab
rrdtool graph ab1.gif --start 1016049600 --end
1016059000 DEF:val1=test_a.rrd:a:AVERAGE
DEF:val2=test_b.rrd:b:AVERAGE
CDEF:val3=val2,UN,val1,val2,IF LINE2:val3#0000FF:ab
My question is why is the line with value 15 drawn
from 12:00-13:00 in a.gif and the same is drawn
between 13:00-14:00 in ab.gif (i.e the CDEF). Am I
doing something very wrong ? I would be very thankful
if someone can clear this.
Thanks,
Ashok
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list