[rrd-users] Re: How to get accurate weekly averages
Alex van den Bogaerdt
alex at ergens.op.het.net
Tue Feb 18 23:26:37 MET 2003
On Tue, Feb 18, 2003 at 09:56:58PM +0200, Jani Muuriaisniemi wrote:
> If I were to draw a graph of the total amount of data transferred with a
> step of one week, I would naturally like the week to start from Monday and
> end on Sunday. But, so far I have been unable to get this done.
>
> Even if the timeperiod between Starttime and Endtime is an even number of
> seconds divideable by the amount of seconds per week, and Starttime is set
> on a Monday, the weekly averages are still not calculated as wanted.
You want to specify start and end with a resolution of one hour.
Therefore you want to use an RRA with a resolution of one hour.
What is "the start of Monday" ? It will differ between Europe and the US,
it will differ between winter and summer.
RRDtool works with UTC. If you specify *your* local time monday 00:00,
it will most likely not be UTC 00:00. If it is, this will change in
6 weeks.
Another problem with your approach: RRDtool works with intervals of
"n" seconds since January 1st, 1970, UTC. If you have an RRA with
a resolution of one week (604800 seconds), the intervals will run from
n*604800 to (n+1)*604800. Monday 00:00, even when it is UTC, will most
likely not be n*604800 seconds since the epoch.
Again: you want to specify your start and end time with a resolution
of one hour so you're going to need to use an RRA with a resolution
of one hour.
One last remark: For the few living in a time zone that is not a
whole number of hours away from UTC, read "half an hour" where I
wrote "one hour".
HTH
Alex
--
Much of what looks like rudeness in hacker circles is not intended to give
offence. Rather, it's the product of the direct, cut-through-the-bullshit
communications style that is natural to people who are more concerned about
solving problems than making others feel warm and fuzzy.
http://www.tuxedo.org/~esr/faqs/smart-questions.html
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list