[rrd-developers] Re: data -> Nan conversion in reduce_data()

James Kingston james.kingston at gmail.com
Fri Nov 12 01:13:43 MET 2004


<alex at ergens.op.het.net> wrote:
> On Thu, Nov 11, 2004 at 02:13:57PM -0800, James Kingston wrote:
> 
> > I tracked it down to the reduce_data function, where the leftovers at
> > each end of the time range, after the data reduction, were being
> > discarded by converting them to NaN.
> 
> Are you saying you found the following to be incorrect:
> 
>     /* If we had to alter the endtime, there won't be
>     ** enough data to fill the last row.  This means
>     ** we have to skip some rows at the end
>     */

That was my original assumption, but I was incorrect.  Once I realized
what reduce_data was doing, it made sense why it was discarding rows.

> What happens if you set end_time to a whole multiple of
> steps times step ? (and don't use this new parameter)

I'm not sure what you mean by steps times step, but I found that if I
set the start and end times to timestamps that were divisible by the
step AND divisible by the reduce_factor of the (discarded) graphs, we
would get back what we were expecting.  We could also get back
accurate averages if we set the start and end times to timestamps that
were divisible by the step and set the width of the imaginary graph to
((end - start) / step), effectively telling reduce_data not to reduce
at all.

The reason that neither of these worked very well for us is that it
required that we have advanced knowledge of the step value before we
requested the data.  We have many rrds with different heartbeats and
different rollup intervals, so when querying an rrd for the average
over the last 30 days we don't know if the data will be in 24 minute
increments, 15 minutes, or 30, for a few examples of what I've found
on our network.

Thanks,

James

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list