[rrd-users] Combining Multi-RRD Datapoints in Graph

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Fri Feb 13 16:00:31 CET 2009

----- Original Message ----- 
From: "William R. Lorenz" <wrl at express.org>
To: <rrd-users at lists.oetiker.ch>
Sent: Friday, February 13, 2009 2:19 PM
Subject: [rrd-users] Combining Multi-RRD Datapoints in Graph

> Hi,
> I'm looking to take 2-4 unique RRD files that plot the same data from
> different perspectives (i.e. temperature readings from four different
> sensors) and average all the data points together into one graph line.
> Is there a CDEF, VDEF, or other such function that will allow me to
> average more than one data source together for this rrdgraph purpose?
> If someone could point me to the applicable section of documentation
> and/or has an example, I'd be very appreciative.  Thanks, in advance.

Sounds like you need to use CDEF AVG. See 
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html and look for the AVG 

After you've succesfully averaged the temperatures into one temperature, you 
have your line.  And you could then combine it with VDEF AVERAGE to print 
the average of those averages to get the average of all sources over all of 
the displayed time.

(or, without the VDEF:  GPRINT:result:AVERAGE:%6.2lf)

More information about the rrd-users mailing list