[rrd-users] [rrd] Re: Re: 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 12:01:51 CET 2013


Today j.halifax2 at seznam.cz wrote:

>
>
>
> >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.
>
>
>
> Could you please offer us a formula for calculating a time-step value
>
> of V = f(ti, vi) where ti belong to (t0, tn> for natural n (meaningful).
>
> It would be clearer.

look for "data resampling" on

http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html

for some more detail ..

rrdtool simply integrates the space underneeth the curve set by the
samples and adds a new value at the --step interval so that the
space below the new (simpler) curve is the same as with the
original sampling data ...

the curve we are talking here is a simple staire case ... which is
ideal for the standard 'counter reading' type input.

for gauge type samples, one might argue that a different curve
might be more apropriate (a linear one for example)

cheers
tobi


>
>
>
>
> Thank you so much.
>
> jh
>
>
>
>
> ---------- P?vodní zpráva ----------
> Od: Tobias Oetiker <tobi at oetiker.ch>
> Datum: 25. 1. 2013
> P?edm?t: Re: [rrd-users] How rrdtool will work if there are two or more
> sample points in one time step
>
> "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.
>
> hth
> tobi
>

-- 
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