[rrd-users] rrd create update problem

homephilsch at gmx.de homephilsch at gmx.de
Mon Jul 26 14:32:30 CEST 2010


Hi Karl,

thank you very much. Now it works!!!

My dump now looks like:
...
<!-- 2010-07-24 02:00:00 CEST / 1279929600 --> <row><v> NaN </v></row>
                        <!-- 2010-07-25 02:00:00 CEST / 1280016000 --> <row><v> 1.7500000000e+02 </v></row>
...

So I already have a valid entry!

And for everybody who is facing the same problem, see the previous post of Karl. The calculation timestamp=$(( $(date +%s) / $step * $step )) seems to have solved my problem.

During the next days I will check whether my update-script will update the rrd file correctly.

Thanks again for your good explanation and the (shell) code provided!


> Hi Phil,
> 
> rrdtool storage bins are *always* $timestamp modulo $step (all relative to
> UTC)
> 
> That means if you choose 1 day (86400) as a step size, the recording will
> always
> be at UTC 0:00 which happens to be 02:00 your time ...
> 
> If that doesn't meet your requirements, you should probably record on an
> hourly
> basis and correct/convert date&time at display-time.
> 
> That also means you should choose your $start and update timestamps
> accordingly,
> so instead of using:
> 
> timestamp=`date '+%s'`
> 
> you should use
> 
> step=86400
> timestamp=$(( $(date +%s) / $step * $step ))
> 
> and for creation you should use
> 
> --start $(( $timestamp - $step ))
> 
> 
> And: your rrd will only contain valid data after you have at least two db
> updates
> in different bins within your heartbeat - that means with a step size of
> 86400
> you'll see valid data after two days ...
> 
> hth
> - Karl
> 
> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



More information about the rrd-users mailing list