From 65c3cfc65d68cb8ad49dfa6af8052b953bfe81f6 Mon Sep 17 00:00:00 2001 From: oetiker Date: Wed, 9 May 2001 05:31:01 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@36 a5681a0c-68f1-0310-ab6d-d61299d08faa --- NEWS | 1 + doc/rrdcreate.pod | 5 +++-- src/rrd_update.c | 10 ++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index febb618..19fed3e 100644 --- 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 + 2001/03/10 Jake Brutlag Support for COMPUTE data sources (CDEF data sources). Removes the RPN parser and calculator from rrd_graph and puts then in a new file, diff --git a/doc/rrdcreate.pod b/doc/rrdcreate.pod index 74cfa34..b43f70a 100644 --- a/doc/rrdcreate.pod +++ b/doc/rrdcreate.pod @@ -161,7 +161,8 @@ in the create command. This is similar to the restriction that Bs must refer only to Bs and Bs previously defined in the same graph command. =item BIB<:>I - + + The purpose of an B is to store data in the round robin archives (B). An archive consists of a number of data values or statistics for each of the defined data-sources (B) and is defined with an B line. @@ -187,7 +188,7 @@ I defines how many generations of data values are kept in an B. =back -=head1 Aberrant Behaviour detection with Holt-Winters forecasting +=head1 Aberrant Behavior Detection with Holt-Winters Forecasting by Jake Brutlag Ejakeb@corp.webtv.netE diff --git a/src/rrd_update.c b/src/rrd_update.c index 35ac6a6..b6ac868 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -5,6 +5,12 @@ ***************************************************************************** * $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 + * * 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 */ - /* 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 */ @@ -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 + 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 */ -- 2.11.0