[rrd-users] Re: timezones per graph

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Feb 7 17:54:07 MET 2000


John Gmeinder wrote:
> I have an RRA interval of 1 hour.  I then created an RRA to aggregate 12
> intervals. Here is my create statement.

This is where it goes wrong.  You are not aggregating 12 samples starting
at 00:00 local time, you are aggregating 12 samples starting at 00:00 UTC.
The next aggregate goes from 12:00 UTC to 24:00 UTC.
This is the way that RRDtool was designed.

> rrdtool create ..\data\users.rrd --start "01/31/2000 00:00" --step 3600
> DS:allusers:GAUGE:7200:U:U DS:acsusers:GAUGE:7200:U:U
> RRA:AVERAGE:0.9999:1:168 RRA:MIN:0.9999:12:120 RRA:MAX:0.9999:12:120
> RRA:AVERAGE:0.9999:12:120

You want to keep 120 intervals of 12 hours.  Alter this into 120*12
intervals of 1 hour.  This will increase the disk space usage.

It translates into:
	rrdtool create ..\data\users.rrd --start "01/31/2000 00:00" --step 3600
		DS:allusers:GAUGE:7200:U:U
		DS:acsusers:GAUGE:7200:U:U
		RRA:AVERAGE:0.9999:1:1440

Now you should be able to query as follows:

	rrdtool graph null
		--start "02/01/2000 12:00"
		--end "02/02/2000 00:00"
		DEF:allusers=..\data\users.rrd:allusers:AVERAGE
		PRINT:allusers:MIN:"Minimum: %2lf\n"
		PRINT:allusers:AVERAGE:"Average: %2lf\n"
		PRINT:allusers:MAX:"Maximum: %2lf\n"

Or, if you need the values each day:
	rrdtool graph null
		--end 00:00
		--start end-12h
		DEF:allusers=..\data\users.rrd:allusers:AVERAGE
		PRINT:allusers:MIN:"Minimum: %2lf\n"
		PRINT:allusers:AVERAGE:"Average: %2lf\n"
		PRINT:allusers:MAX:"Maximum: %2lf\n"

The other interval can be found using start or end time magic, for
example:
	--start "00:00 yesterday"
	--end start+12h

regards,
Alex

> 
> alex at ergens.op.Het.Net on 02/07/2000 08:55:47 AM
> 
> To:   John Gmeinder/Bsg/MetLife/US at MetLife
> cc:   rrd-users at list.ee.ethz.ch
> Subject:  Re: [rrd-users] timezones per graph
> 
> 
> 
> John Gmeinder wrote:
> >
> > Oops, I see my problem is a bit different.  The problem is not in creating the
> > graphs, it is in the aggregate.  When I store a MAX, based on 12 counters, it
> is
> > starting at real time 0, not my timezone 0.  What I am looking to do is get
> the
> > MAX for my timezone 0-11 (a.m.), and 12-23 (p.m) .  Can I do that, and graph
> it
> > based on my timezone?
> 
> I assume you're talking about an RRA that stores the data in 12-hour
> intervals.  If so:
> 
> The first interval will start at 0:00 UTC, the second one at 12:00 UTC.
> What you need is an interval that starts at 0:00 in some other timezone.
> RRDtool cannot handle this (as it would otherwise need to store CDPs at
> arbitrary times such as 5:00 UTC).
> 
> The most portable thing to do is to make sure there always is an interval
> that starts at 0:00 UTC, for each and every timezone.  That implicates
> that you need to use intervals of one hour (assuming that all timezones
> are on whole hours; is this correct?)
> 
> Doing it this way should allow for averages, maxima etcetera from
> your midnight to the next midnight.
> 
> regards,
> --
>    __________________________________________________________________
>  / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
> | work                                                         private |
> | My employer is capable of speaking therefore I speak only for myself |
> +----------------------------------------------------------------------+
> 
> 
> 
> 
> 
> 
> 
> 
> --
> 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
> 


-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
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



More information about the rrd-users mailing list