[rrd-users] couple of questions
A Darren Dunham
ddunham at taos.com
Thu Sep 9 23:47:15 CEST 2010
On Wed, Sep 08, 2010 at 08:08:56PM -0700, Ricardo Kleemann wrote:
> How do I go about doing a TOTAL VDEF? That would take care of summing
> up the data points between start/end?
Take a look at the "rrdgraph_rpn"
You create a DEF for your data say something like:
DEF:data=myfile.rrd:data:[blah,blah]
Then with it available as 'data', you can total it with:
VDEF:total_data=data,TOTAL
Then print it with something like
GPRINT:total_data:Total for data is %f
> If you truly want to sum something that is only a subset of the
> graph,
> I'd probably try to construct a CDEF from the original data and have
> it
> nulled out outside the region of interest. Then run TOTAL on it as
> above.
Whoops. That's more complex than necessary. I forgot that you can
supply start/end on a DEF. So you don't have to calculate a separate
CDEF for it, even if your graph is of a different time period.
Presume you have a way to get the start and end of your timeperiod in
there, you'd just do:
DEF:one-month=myfile.rrd:data:AVERAGE:start=$start:end=$end
VDEF:month-total=one-month,TOTAL
[...]
--
Darren
More information about the rrd-users
mailing list