[rrd-users] setting last_update
Dan Langille
dan at langille.org
Thu Feb 15 16:48:56 CET 2007
On 15 Feb 2007 at 16:23, Alex van den Bogaerdt wrote:
> On Thu, Feb 15, 2007 at 09:18:05AM -0500, Dan Langille wrote:
>
> > FWIW, here is a test case I created by looking at what the symon code
> > was doing:
> >
> > rrdtool create cpu0.rrd --step=5 --start=0 DS:user:GAUGE:5:0:100
> > DS:nice:GAUGE:5:0:100 DS:system:GAUGE:5:0:100
> > DS:interrupt:GAUGE:5:0:100 DS:idle:GAUGE:5:0:100
> > RRA:AVERAGE:0.5:1:34560 RRA:AVERAGE:0.5:360:672
> > RRA:AVERAGE:0.5:1440:600 RRA:AVERAGE:0.5:17280:600
> > RRA:MAX:0.5:1:34560 RRA:MAX:0.5:360:672 RRA:MAX:0.5:1440:600
> > RRA:MAX:0.5:17280:600 RRA:MIN:0.5:1:34560 RRA:MIN:0.5:360:672
> > RRA:MIN:0.5:1440:600 RRA:MIN:0.5:17280:600
>
> Looking reasonable. I only dislike "--start=0", which is
> probably harmless.
>
> You could try a much more simple case as well:
>
> rrdtool create test.rrd DS:x:GAUGE:600:U:U RRA:AVERAGE:0:1:5
> rrdtool dump test.rrd
That looks OK
# rrdtool dump test.rrd | less
<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1171554437 </lastupdate> <!-- 2007-02-15
07:47:17 PST -->
<ds>
<name> x </name>
<type> GAUGE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> NaN </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 137 </unknown_sec>
</ds>
<!-- Round Robin Archives --> <rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<params>
<xff> 0.0000000000e+00 </xff>
</params>
<cdp_prep>
<ds>
<primary_value> 0.0000000000e+00
</primary_value>
<secondary_value> 0.0000000000e+00
</secondary_value>
<value> NaN </value>
<unknown_datapoints> 0 </unknown_datapoints>
</ds>
</cdp_prep>
<database>
<!-- 2007-02-15 07:25:00 PST / 1171553100 -->
<row><v> NaN </v></row>
<!-- 2007-02-15 07:30:00 PST / 1171553400 -->
<row><v> NaN </v></row>
<!-- 2007-02-15 07:35:00 PST / 1171553700 -->
<row><v> NaN </v></row>
<!-- 2007-02-15 07:40:00 PST / 1171554000 -->
<row><v> NaN </v></row>
<!-- 2007-02-15 07:45:00 PST / 1171554300 -->
<row><v> NaN </v></row>
</database>
</rra>
</rrd>
>
>
> > I didn't supply the whole dump as it is 109,870 lines....
>
> Heh... you thought "head -7" was to show off ? :)
>
> > The last date is 31900-02-14 16:00:00 PST / -38934592 and the first
> > date is 31900-02-13 00:00:05 PST / -38948991
>
> Negative numbers mixed with numbers larger than 32 bit. Sounds
> like a signed/unsigned integer bug, undetected so far, and now
> the bug starts biting.
>
> I could be totally wrong here. I'm no programmer.
Should this be moved to the developers list?
--
Dan Langille : Software Developer looking for work
my resume: http://www.freebsddiary.org/dan_langille.php
PGCon - The PostgreSQL Conference - http://www.pgcon.org/
More information about the rrd-users
mailing list