Bug fix: when update of multiple PDP/CDP RRAs coincided
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 9 May 2001 05:31:01 +0000 (05:31 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 9 May 2001 05:31:01 +0000 (05:31 +0000)
with interpolation of multiple PDPs an incorrect value was
stored as the CDP. Especially evident for GAUGE data sources.
Minor changes to rrdcreate.pod. -- Jake Brutlag <jakeb@corp.webtv.net>

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@36 a5681a0c-68f1-0310-ab6d-d61299d08faa

NEWS
doc/rrdcreate.pod
src/rrd_update.c

diff --git a/NEWS b/NEWS
index febb618..19fed3e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ RRDTOOL NEWS
 In this file I am noting the Major changes to rrdtool
 for details check the cvs ChangeLog
 
 In this file I am noting the Major changes to rrdtool
 for details check the cvs ChangeLog
 
+
 2001/03/10 Jake Brutlag <jakeb@corp.webtv.net>
   Support for COMPUTE data sources (CDEF data sources). Removes the RPN
   parser and calculator from rrd_graph and puts then in a new file,
 2001/03/10 Jake Brutlag <jakeb@corp.webtv.net>
   Support for COMPUTE data sources (CDEF data sources). Removes the RPN
   parser and calculator from rrd_graph and puts then in a new file,
index 74cfa34..b43f70a 100644 (file)
@@ -161,7 +161,8 @@ in the create command. This is similar to the restriction that B<CDEF>s must
 refer only to B<DEF>s and B<CDEF>s previously defined in the same graph command.
 
 =item B<RRA:>I<CF>B<:>I<cf arguments>
 refer only to B<DEF>s and B<CDEF>s previously defined in the same graph command.
 
 =item B<RRA:>I<CF>B<:>I<cf arguments>
-  
+
+
 The purpose of an B<RRD> is to store data in the round robin archives
 (B<RRA>). An archive consists of a number of data values or statistics for 
 each of the defined data-sources (B<DS>) and is defined with an B<RRA> line.
 The purpose of an B<RRD> is to store data in the round robin archives
 (B<RRA>). An archive consists of a number of data values or statistics for 
 each of the defined data-sources (B<DS>) and is defined with an B<RRA> line.
@@ -187,7 +188,7 @@ I<rows> defines how many generations of data values are kept in an B<RRA>.
 
 =back
 
 
 =back
 
-=head1 Aberrant Behaviour detection with Holt-Winters forecasting
+=head1 Aberrant Behavior Detection with Holt-Winters Forecasting
 
 by Jake Brutlag E<lt>jakeb@corp.webtv.netE<gt>
 
 
 by Jake Brutlag E<lt>jakeb@corp.webtv.netE<gt>
 
index 35ac6a6..b6ac868 100644 (file)
@@ -5,6 +5,12 @@
  *****************************************************************************
  * $Id$
  * $Log$
  *****************************************************************************
  * $Id$
  * $Log$
+ * Revision 1.5  2001/05/09 05:31:01  oetiker
+ * Bug fix: when update of multiple PDP/CDP RRAs coincided
+ * with interpolation of multiple PDPs an incorrect value was
+ * stored as the CDP. Especially evident for GAUGE data sources.
+ * Minor changes to rrdcreate.pod. -- Jake Brutlag <jakeb@corp.webtv.net>
+ *
  * Revision 1.4  2001/03/10 23:54:41  oetiker
  * Support for COMPUTE data sources (CDEF data sources). Removes the RPN
  * parser and calculator from rrd_graph and puts then in a new file,
  * Revision 1.4  2001/03/10 23:54:41  oetiker
  * Support for COMPUTE data sources (CDEF data sources). Removes the RPN
  * parser and calculator from rrd_graph and puts then in a new file,
@@ -426,7 +432,7 @@ rrd_update(int argc, char **argv)
               rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt >= interval) {
               double rate = DNAN;
               /* the data source type defines how to process the data */
               rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt >= interval) {
               double rate = DNAN;
               /* the data source type defines how to process the data */
-               /* pdp_temp contains rate * time ... eg the bytes
+               /* pdp_new contains rate * time ... eg the bytes
                 * transferred during the interval. Doing it this way saves
                 * a lot of math operations */
                
                 * transferred during the interval. Doing it this way saves
                 * a lot of math operations */
                
@@ -760,7 +766,7 @@ rrd_update(int argc, char **argv)
                                                  cum_val = IFDNAN(rrd.cdp_prep[iii].scratch[CDP_val].u_val, 0.0);
                                                  cur_val = IFDNAN(pdp_temp[ii],0.0);
                           rrd.cdp_prep[iii].scratch[CDP_primary_val].u_val =
                                                  cum_val = IFDNAN(rrd.cdp_prep[iii].scratch[CDP_val].u_val, 0.0);
                                                  cur_val = IFDNAN(pdp_temp[ii],0.0);
                           rrd.cdp_prep[iii].scratch[CDP_primary_val].u_val =
-                                              (cum_val + cur_val) /
+                                              (cum_val + cur_val * start_pdp_offset) /
                                           (rrd.rra_def[i].pdp_cnt
                                               -rrd.cdp_prep[iii].scratch[CDP_unkn_pdp_cnt].u_cnt);
                                                   /* initialize carry over value */
                                           (rrd.rra_def[i].pdp_cnt
                                               -rrd.cdp_prep[iii].scratch[CDP_unkn_pdp_cnt].u_cnt);
                                                   /* initialize carry over value */