[rrd-users] Re: Daily statistics - midnight local vs UTC
Alex van den Bogaerdt
alex at ergens.op.het.net
Sat Nov 11 16:48:15 MET 2006
On Sat, Nov 11, 2006 at 09:28:45AM -0600, Larkin Lowrey wrote:
> Hello, I am trying to record daily averages and am running into a
> problem where rrdtool thinks that the day begins at midnight UTC instead
> of midnight localtime (CST). I remember encountering this problem
> several years ago but can't remember the solution.
> I'm a bit surprised this is still an open issue.
There isn't an issue. It is documented behaviour and rrdtool is doing
what you ask it to do.
> What is the magic trick?
If you want data to start and end on something else than n*86400,
you need RRAs covering something else than 86400 seconds per row.
> Here's what I used to create the database.
>
> rrdtool create mailstats.rrd \
> --step 3600 \
> DS:rejected:COUNTER:7200:U:U \
> DS:spam:COUNTER:7200:U:U \
> DS:passed:COUNTER:7200:U:U \
> RRA:AVERAGE:0.5:1:744 \
{n-1}*3600 to {n}*3600, for example n==322926:
a slot starting at 1162530000 and ending at 1162533600
(23:00 to 24:00 your local time I believe)
This means you can do: start=end-24h end=1162533600
RRDtool should select the 24 hours making up your local day,
provided of course that the data is available.
> RRA:AVERAGE:0.5:24:730 \
{n-1}*24*3600 to {n}*24*3600, for example n==13456:
a slot starting at 1162512000 and ending at 1162598400
This RRA does not have a timeslot ending at 1162533600
because 1162533600 is not n*86400 (n is an integer number).
--
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