[rrd-users] Re: 1-day step interval woes

Alex van den Bogaerdt alex at ergens.op.het.net
Mon Aug 28 18:02:35 MEST 2006


On Mon, Aug 28, 2006 at 11:30:57AM -0400, Zac DeLesDernier wrote:
> So a few months ago, I threw together a quick script to help our 
> intranet users track their weight.  It mostly works as expected, though 
> there are a few minor annoyances that I hope you guys can help with.  
> First, consider the following:
> * Data points are entered manually, once a day, usually in the morning.

Your script could normalize the time, to midnight UTC.

> * The RRD files are created like so: RRDs::create("$user.rrd", '-s', 
> 86200, 'DS:ds0:GAUGE:345600:0:300', 'RRA:AVERAGE:0.5:1:56', 
> 'RRA:AVERAGE:0.5:7:52', 'RRA:AVERAGE:0.5:28:48');
>     - the "step interval" is 86200 seconds = 1 day

No.  24 hours times 60 minutes times 60 seconds is 86400, not 86200.

>     - there is only 1 DS in the rra, which will be considered UNKNOWN 
> after 4 days


>     - there are 3 RRAs: 56 1-day samples, 52 1-week samples, 48 
> 1-month-ish samples

After correcting the step: yes

> So... now for the annoyances...
> 
> * Users expect the data point that they've just entered to show up on 
> the graph.  Sometimes... this doesn't happen.  Like when you first 
> start... (or, more generally, whenever yesterday's value is UNKNOWN.)

Could very well be that wrong step.  Also you may need to normalize
start and end time yourself (like I suggested for updating).

> * It would be nice if the lines representing the daily data points lined 
> up with the graph lines... but they're offset by the time zone.

Yep.  Try 24 hours in stead of one day.

> * It would be nice if weeks fit into the week lines on the graph.  Right 
> now... Tuesday appears to be day 1...?

A week starts at {n*(7*24*60*60)} and ends at {(n+1)*(7*24*60*60)}
This is true for any interval, not just for a week.


More on consolidation etc. on my site

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