[rrd-users] xport and time zones

Sijs, Dick van der - Acision dick.van.der.sijs at acision.com
Tue Oct 28 21:32:39 CET 2008


Hello all,

I have data in a couple of rrd databases (one per server) and I'm interested in the daily average and maximum of the sum of this data.
Note that I need to sum the data first (it is in 15 minutes intervals by the way) before I can know the maximum of the sum.
So I am using the rrdtool xport function as I want rrdtool to do the CDEF calculations on these .rrd's (as opposed doing fetch and do all myself).
For daily results (one day is 864000 seconds) over a 10-day period, I need to use (per recommendation from the RRDtool web site and this list):

end time   == int(t/86400)*86400,

start time == end time - 864000,

resolution == 86400

But now comes the tricky part: these calculations assume epoch seconds and so result in data from midnight to midnight UTC.
However I am interested not in 24h periods that match UTC days, but I need it in another time zone (e.g. 00:00 PST8PDT).
I have been playing with setting TZ variable but xport doesn't seem to take that (I am working on a red hat linux machine).
Doing something like
$ TZ=PST8PDT rrdtool xport ...
does not get me what I am after. The <start> element is not on my desired time zone boundary but on 00:00 GMT (note <step> is OK: 86400):
<xport>
  <meta>
    <start>1224374400</start>
    <step>86400</step>
    <end>1225238400</end>
    <rows>11</rows>
...

Anybody ran into this before and knows a solution?

Thanks in advance for any feedback!
Dirk



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20081028/79b17894/attachment-0001.html 


More information about the rrd-users mailing list