[rrd-users] Weird problem with RRDs::create

Stefan Berder sbe at oleane.net
Tue May 31 11:01:20 MEST 2005


Hi all,
I got a weird problem when creating RRD file via a Perl script and I
admin I don't really understand the issue.
My script is parsing some logs and creating an RRD file to update it
afterward.

The creation :
    RRDs::create ("report.rrd",
                  "--start", $epochstart
                  , "--step", 1,
                  "DS:avgtime:GAUGE:2:0:U",
                  "DS:avgtime2:GAUGE:2:0:U",
                  "DS:avgtime3:GAUGE:2:0:U",
                  "DS:hit:GAUGE:2:0:U",
                  "DS:size:GAUGE:2:0:U",
                  "DS:code200:GAUGE:2:0:U",
                  "DS:code401:GAUGE:2:0:U",
                  "DS:codexxx:GAUGE:2:0:U",
                  "RRA:AVERAGE:0.5:1:$rows",

Where $epochstart is for example 1117524058 (Tue May 31 09:20:58 2005)
and rows is calculated by $epochend - $epochstart = 315 as I should have
a value each second.

My first problem is that when doing that the rrd file is not starting at
$epochstart ...
rrdtool info returns : last_update = 1117524151

when I try the command directly from commandline the result is
different: 
$ rrdtool create report.rrd --start 1117524058 --step 1
DS:avgtime:GAUGE:2:0:U DS:avgtime2:GAUGE:2:0:U DS:avgtime3:GAUGE:2:0:U
DS:hit:GAUGE:2:0:U DS:size:GAUGE:2:0:U DS:code200:GAUGE:2:0:U
DS:code401:GAUGE:2:0:U DS:codexxx:GAUGE:2:0:U RRA:AVERAGE:0.5:1:315
$ rrdtool info report.rrd | grep last_update
last_update = 1117524058

Now it's taking my start date as the last date I could set ... which is
obviously what I'm not trying to get.

Then of course, my updates fail.

Maybe someone could help me ?

Stefan
-- 
 #=- Stefan Berder                  tel : 6 14 80        -=#
 #=- Ingénieur système et réseau          01 53 95 14 80 -=#
 #=- TRANSPAC / DO-DAE-ADMP-iSO    mail : sbe at oleane.net -=#
 #=- /(bb|[^b]{2})/      stefan.berder at francetelecom.com -=#

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