[rrd-users] Re: Weird problem with RRDs::create
Alex van den Bogaerdt
alex at ergens.op.het.net
Tue May 31 15:19:01 MEST 2005
On Tue, May 31, 2005 at 11:01:20AM +0200, Stefan Berder wrote:
> I got a weird problem when creating RRD file via a Perl script and I
> admin I don't really understand the issue.
Well, if you don't understand the issue, you shouldn't admin :)
(just kidding)
> 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",
Looks fine at a first glance. You're sure the values of the
variables make it into rrdtool?
> 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.
The first timestamp you can set will be 1117524059. This will define
the interval from 1117524058 to 1117524059.
If you want to fill the interval >ending< at 1117524058, you should
set the start at 1117524058 - stepsize (1117524057 in your case)
> My first problem is that when doing that the rrd file is not starting at
> $epochstart ...
> rrdtool info returns : last_update = 1117524151
Weird. I can't think of something that would cause this right now.
Again: are you sure "$epochstart" is 1117524058 and makes it into
rrdtool ?
1117524151-1117524058=93, not a value indicating an obvious mistake.
> 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.
No. "last_update" is the last update that occured. All intervals
upto 1117524058 are defined, you can fill the next slot.
I think I've given you some information you can use. Was it enough?
HTH
Alex
--
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