[rrd-users] Limit on step size in rrdtool create?

Gary Kakazu kakazu at berbee.com
Thu Aug 12 16:15:48 MEST 1999


I'm a new user to rrd and have rrdtool-1.0.4 on my Redhat 6 box.

I'm interested in plotting one value per day, and thought I could just
set the step size to 86400 (seconds in a day) and use rrdtool update for
each new value. However, I found that the values I was putting in via
rrdtool update were not the the ones in the RRA. After playing around
with it a while, I found that things worked as I thought they should
work if the step size was 3600 seconds or less.

Perhaps it is just my ignorance of how the tool saves data. Can someone
explain what is going on?

I have 2 examples below. Both use the same start time (7 March 1999,
5:00 AM CST). The first example has a step size of 3600 secs, the second
example 7200 secs. After I create the rrd, I update it with 5 values. In
the first example, I update it every 3600 seconds, in the second I
update it every 7200 seconds.

A dump of the rrd for the first example shows what I would expect. Since
I updated the rrd every hour, starting an hour after the start time, the
values I put in show up in the rra.

But in the dump from the second example, the times in the rra are 6:00,
8:00, 10:00, 12:00, & 14:00. I would expect the times to be 7:00, 9:00,
11:00, 13:00, and 15:00, since the start time was 5:00, and the step
size is 2 hours. Also, the values are obviously interpolated since the
times I specified in the update were 7:00, 9:00, 11:00, 13:00 and 15:00.
Is this the way it is supposed to work, and if so, why?


Thanks
Gary




$ rrdtool create test.rrd --start 920804400 --step 3600
DS:speed:GAUGE:7200:U:U RRA:LAST:0.5:1:5
$ rrdtool update test.rrd 920808000:40
$ rrdtool update test.rrd 920811600:50
$ rrdtool update test.rrd 920815200:60
$ rrdtool update test.rrd 920818800:70
$ rrdtool update test.rrd 920822400:80

$ rrdtool dump test.rrd
<!-- Round Robin Database Dump -->
<rrd>
	<version> 0001 </version>
	<step> 3600 </step> <!-- Seconds -->
	<lastupdate> 920822400 </lastupdate> <!-- 1999-03-07 10:00:00 CST -->

	<ds>
		<name> speed </name>
		<type> GAUGE </type>
		<minimal_heartbeat> 7200 </minimal_heartbeat>
		<min> NaN </min>
		<max> NaN </max>

		<!-- PDP Status -->
		<last_ds> UNKN </last_ds>
		<value> 0.0000000000e+00 </value>
		<unknown_sec> 0 </unknown_sec>
	</ds>

<!-- Round Robin Archives -->
	<rra>
		<cf> LAST </cf>
		<pdp_per_row> 1 </pdp_per_row> <!-- 3600 seconds -->

		<cdp_prep>
			<ds><value> NaN </value>  <unknown_datapoints> 0
</unknown_datapoints></ds>
		</cdp_prep>
		<database>
			<!-- 1999-03-07 06:00:00 CST --> <row><v> 4.0000000000e+01 </v></row>
			<!-- 1999-03-07 07:00:00 CST --> <row><v> 5.0000000000e+01 </v></row>
			<!-- 1999-03-07 08:00:00 CST --> <row><v> 6.0000000000e+01 </v></row>
			<!-- 1999-03-07 09:00:00 CST --> <row><v> 7.0000000000e+01 </v></row>
			<!-- 1999-03-07 10:00:00 CST --> <row><v> 8.0000000000e+01 </v></row>
		</database>
	</rra>
</rrd>



--------------------------------------------------

$ rrdtool create test.rrd --start 920804400 --step 7200
DS:speed:GAUGE:14400:U:U RRA:LAST:0.5:1:5
$ rrdtool update test.rrd 920811600:40
$ rrdtool update test.rrd 920818800:50
$ rrdtool update test.rrd 920826000:60
$ rrdtool update test.rrd 920833200:70
$ rrdtool update test.rrd 920840400:80

$ rrdtool dump test.rrd
<!-- Round Robin Database Dump -->
<rrd>
	<version> 0001 </version>
	<step> 7200 </step> <!-- Seconds -->
	<lastupdate> 920840400 </lastupdate> <!-- 1999-03-07 15:00:00 CST -->

	<ds>
		<name> speed </name>
		<type> GAUGE </type>
		<minimal_heartbeat> 14400 </minimal_heartbeat>
		<min> NaN </min>
		<max> NaN </max>

		<!-- PDP Status -->
		<last_ds> UNKN </last_ds>
		<value> 2.8800000000e+05 </value>
		<unknown_sec> 0 </unknown_sec>
	</ds>

<!-- Round Robin Archives -->
	<rra>
		<cf> LAST </cf>
		<pdp_per_row> 1 </pdp_per_row> <!-- 7200 seconds -->

		<cdp_prep>
			<ds><value> NaN </value>  <unknown_datapoints> 0
</unknown_datapoints></ds>
		</cdp_prep>
		<database>
			<!-- 1999-03-07 06:00:00 CST --> <row><v> 4.0000000000e+01 </v></row>
			<!-- 1999-03-07 08:00:00 CST --> <row><v> 4.5000000000e+01 </v></row>
			<!-- 1999-03-07 10:00:00 CST --> <row><v> 5.5000000000e+01 </v></row>
			<!-- 1999-03-07 12:00:00 CST --> <row><v> 6.5000000000e+01 </v></row>
			<!-- 1999-03-07 14:00:00 CST --> <row><v> 7.5000000000e+01 </v></row>
		</database>
	</rra>
</rrd>



-- 
Gary Kakazu                                     kakazu at berbee.com
Systems Engineer                                Voice: 608 298-1105
Berbee Information Networks Corporation         Fax:   608 288-3007
http://www.mailbag.com/users/kakazu

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list