[rrd-users] Get step size from graphv

Fredrik Kers fredrik.kers at absilion.com
Fri Oct 15 12:03:47 CEST 2010


Ahh, that's right. Each DEF can specify a step value... I will not override
the step size in my graphs, so I guess I can do something like:

CDEF:cur_time=ds1,POP,TIME
CDEF:step=cur_time,PREV(cur_time),-
VDEF:last_step=step,LAST
PRINT:last_step:%lf

And parse the step size from print[0].

/Fredrik

On Fri, Oct 15, 2010 at 11:31, Tobias Oetiker <tobi at oetiker.ch> wrote:

> Hi Frederik,
>
> Today Fredrik Kers wrote:
>
> > Thanks for the quick reply!
> >
> > I want to display the resolution of the graphed data to the user. Since
> the
> > data is resampled (by fetch?) I don't know the resolution. According to
> the
> > fetch documentation "the fetch function is normally used internally by
> the
> > graph function to get data from RRDs", so i guess the "step size" or
> > resolution is known to the graph(v) function but not returned.
>
> the resolution is known to rrd_graph but as I said, each DEF could
> return a different resolution ...
>
> cheers
> tobi
>
> > /Fredrik
> >
> > On Fri, Oct 15, 2010 at 09:23, Tobias Oetiker <tobi at oetiker.ch> wrote:
> >
> > > Hi Frederik,
> > >
> > > Today Fredrik Kers wrote:
> > >
> > > > Hi!
> > > >
> > > > I'm using the python rrdtool bindings to create a interactive view of
> rrd
> > > > data where you can zoom and pan in the graph. Is there a way to get
> the
> > > step
> > > > size of the graph created by rrdtool.graphv, like you get from
> > > > rrdtool.fetch?
> > >
> > > the step is not necessarily unifor as far as the input data is
> > > concerned ... the data gets re-sampled inside rrdgraph prior to
> > > drawing ...
> > >
> > > what problem are you tring to solve ?
> > >
> > > cheers
> > > tobi
> > >
> > >
> > > > /Fredrik
> > > >
> > >
> > > --
> > > 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
> > >
> >
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20101015/6d6f0b25/attachment.htm 


More information about the rrd-users mailing list