[rrd-users] Combine average data to one CDEF

Hans van Kilsdonk hans at vankilsdonk.nl
Wed May 21 09:25:18 CEST 2008


Hello,

At the moment I am trying to combine several RRD data files into one
graph.  I'm storing network traffic into the RRD files per IP
address and I want to add all the data into one CDEF. I have the
following command:

rrdtool graph test.png -s -1d -e now -t 'test graph' \
-l 0 -r -c GRID#666666 -c MGRID#888888 -w 495 -h 200 -a PNG \
-v 'bits per second' \
'DEF:kbin1:/home/data/1.rrd:ds0:AVERAGE' \
'DEF:kbout1:/home/data/1.rrd:ds1:AVERAGE' \
'DEF:kbin2:/home/data/2.rrd:ds0:AVERAGE' \
'DEF:kbout2:/home/data/2.rrd:ds1:AVERAGE' \
'DEF:kbin3:/home/data/3.rrd:ds0:AVERAGE' \
'DEF:kbout3:/home/data/3.rrd:ds1:AVERAGE' \
'CDEF:totalkbin=0,kbin1,+,kbin2,+,kbin3,+' \
'CDEF:totalkbout=0,kbout1,+,kbout2,+,kbout3,+' \
'AREA:totalkbin#CBCCCF:' \
'LINE1:totalkbout#B43F2E:' 

This works like a charm. However, when I want to add another DEF where
the data in the RRD file starts later the whole graph starts at that
time. Any data before the latest start time is not shown in the graph.

Is there a way to avoid this?

Thanks in advance.

-- 
Hans



More information about the rrd-users mailing list