[rrd-users] How rrdtool will work if there are two or more sample points in one time step

Tobias Oetiker tobi at oetiker.ch
Fri Jan 25 10:48:41 CET 2013

Hi David,

Today David Copperfield wrote:

> Hi,
> I am new to wonderful RRD world, and got confused by the
> question:
> Let's say my rrd file's time step is set 300 seconds, but my
> sample script sends data every 60 seconds and update the rrd file
> 5 times (300/60) in each 60 seconds interval. What the final data
> will show up in the rrd file?
> I got bothered by the question, and tried to simulate the case
> but got even more confused.
>  It turns out that if I run rrdtool update <file>  time1:value1
> time2:value2 .... time5:value5 in one command, then I got a
> average of the 5 values (GAUGE type variable for simplicity), but
> if I run 5 'rrdtool update <time:value>' at each interval, then
> the value is of no rules to follow.

this works perfectly well ... note that rrdtool takes the arrival
time of the values into account, so unless they are evenly spaced,
the result will not be the average, but rather an average weighted
by the interval of the values.

Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900

More information about the rrd-users mailing list