[rrd-users] Combine average data to one CDEF

Erik de Mare erik at oezie.org
Wed May 21 09:51:51 CEST 2008




On Wed, 21 May 2008 09:25:18 +0200, Hans van Kilsdonk <hans at vankilsdonk.nl>
wrote:
> Hello,
>
> 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?

Check for unknown, or use rrdtool 1.3.x there is a function to all NAN's
tot good values.
some thing like this.
kbin1,UN,0,kbin1,IF,kbin2,UN,0,kbin2,IF,kbin3,UN,0,kbin3,IF,+,+

> 
> Thanks in advance.
> 
> --
> Hans
> 
Groeten,
Erik



More information about the rrd-users mailing list