[rrd-users] Re: forcing partial pull of data for day over a month

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Oct 3 15:44:18 MEST 2006


On Tue, Oct 03, 2006 at 06:03:43AM -0600, Randy Ridley wrote:

> Now, however, we've decided to only count bandwidth that occurs between
> the prime time hours of 8:00am to 10:00pm. Is there an easy way to have
> the rrdtool do this automatically or am I stuck using the fetch tool and
> doing the math manually?

CDEFs...

You know the time (use LTIME to get local time).
You know what you want and what not.
This means with some if-then-else statements, you can set unwanted data
to unknown, and compute the average of everything that's left.

Make sure start and end times correspond with interval boundaries:
- if your local time zone differs from UTC by a whole number of hours,
  then each interval must be at most one hour
- if your local time zone differs from UTC by, say, 6:15, each interval
  must be at most 15 minutes
- make sure this is also true when daylight saving is active
- a whole number of intervals being equal to one hour (or the appropriate
  number) is also good.  3 times 5 minutes fits in 15 minutes, 3 times
  40 minutes does not fit in one hour, that sort of check.

When graphing this, you also need to think of the graph area width, and
the start and end times of the graph.  It's all about getting the proper
intervals from the proper RRA.

You get time using LTIME.
For time of day use 86400,% (modulo 86400).
You do not want the data that ends at 08:00am  -->  use 28800,LE
You _do_ want the data that ends at 10:00pm --> use 79200,GT
Anything you do not want to count, should be set to unknown. The
average function skips unknown data.

Look in the CDEF tutorial and the generic RRDtool tutorial for
hints and tips on how to form your CDEF.  The mail archives should
also contain some information.

-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

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



More information about the rrd-users mailing list