[rrd-developers] documentation: templates for ansychronous update

Jake Brutlag jakeb at microsoft.com
Fri Feb 16 20:27:06 MET 2001


The template option to the update command is very flexible. It allows the
user to update data sources asynchronously. However, there is a subtle
different behavior that perhaps should be noted in the documentation.

Consider 2 GAUGE data sources, ds1 and ds2, in an rrd file, dummy.rrd with
one RRA (CF AVERAGE and 1 PDP = 1 CDP). Assume the step is the default 300
seconds. Here is the current state of the rrd file (the results from fetch):
 957299100: 4.5273333333e+03 3.9173333333e+03
 957299400: 4.5936666667e+03 3.8680000000e+03
 957299700: 4.5046666667e+03 3.8770000000e+03
 957300000: 4.2830000000e+03 3.6453333333e+03
 957300300: NaN NaN
 957300600: NaN NaN
 957300900: NaN NaN
Now consider the asynchronous updates:
 bin/rrdtool update dummy.rrd -t ds1 957300297:2877
 bin/rrdtool update dummy.rrd -t ds2 957300304:3300
 bin/rrdtool update dummy.rrd -t ds2 957300601:4000
 bin/rrdtool update dummy.rrd -t ds1 957300603:4030
Note that these updates must appear in temporal order. After these updates,
here is the current state of the file:
 957299100: 4.5273333333e+03 3.9173333333e+03
 957299400: 4.5936666667e+03 3.8680000000e+03
 957299700: 4.5046666667e+03 3.8770000000e+03
 957300000: 4.2830000000e+03 3.6453333333e+03
 957300300: 3.3342390572e+03 3.5213592233e+03
 957300600: NaN 3.9906666667e+03
 957300900: NaN NaN
Note that the first data source has reverted to NaN, due to the fact that
the PDP was computed when the third request was processed. Now instead of
the asynchronous updates, suppose updates to both data sources where
synchronized:
 bin/rrdtool update dummy.rrd 957300297:2877:3300
 bin/rrdtool update dummy.rrd 957300601:4030:4000
After these updates, here is the current state of the file:
 957299100: 4.5273333333e+03 3.9173333333e+03
 957299400: 4.5936666667e+03 3.8680000000e+03
 957299700: 4.5046666667e+03 3.8770000000e+03
 957300000: 4.2830000000e+03 3.6453333333e+03
 957300300: 3.6855983333e+03 3.6915000000e+03
 957300600: 3.6855983333e+03 3.6915000000e+03
 957300900: NaN NaN
Note that the values don't match, this is because the linear interpolation
is slightly different. But ds1 does not revert to NaN for the interval
(957300300, 957300600).

I don't this behavior is a bug, and it would be difficult to 'fix' given my
understanding of the current architecture. But I think a user could be
confused so perhaps it should be documented. If it is already document
elsewhere, my apologies.

Jake

Jake Brutlag
Network Analyst
Microsoft WebTV 

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list