X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_format.h;h=e9e6f11ab5a6a45c37ef3453daff06a92ade17e8;hp=d95ea4a73a31178519e689a8829c88e12c0ade4d;hb=f0a82ae15cafb6ad47ea0c9f74754820e92e2078;hpb=a6cabd4d567fa0bfd8192ef99c804f1b2359e22d diff --git a/src/rrd_format.h b/src/rrd_format.h index d95ea4a..e9e6f11 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ @@ -7,6 +7,18 @@ #ifndef _RRD_FORMAT_H #define _RRD_FORMAT_H +/* + * _RRD_TOOL_H + * We're building RRDTool itself. + * + * RRD_EXPORT_DEPRECATED + * User is requesting internal function which need this struct. They have + * been told that this will change and have agreed to adapt their programs. + */ +#if !defined(_RRD_TOOL_H) && !defined(RRD_EXPORT_DEPRECATED) +# error "Do not include rrd_format.h directly. Include rrd.h instead!" +#endif + #include "rrd.h" /***************************************************************************** @@ -25,8 +37,6 @@ #define RRD_VERSION3 "0003" #define FLOAT_COOKIE 8.642135E130 -#include "rrd_nan_inf.h" - typedef union unival { unsigned long u_cnt; rrd_value_t u_val; @@ -166,7 +176,6 @@ enum cf_en { CF_AVERAGE = 0, /* data consolidation functions */ CF_MAXIMUM, CF_LAST, CF_HWPREDICT, - CF_MHWPREDICT, /* An array of predictions using the seasonal * Holt-Winters algorithm. Requires an RRA of type * CF_SEASONAL for this data source. */ @@ -181,7 +190,10 @@ enum cf_en { CF_AVERAGE = 0, /* data consolidation functions */ /* An array of smoothed seasonal deviations. Requires * an RRA of type CF_HWPREDICT for this data source. * */ - CF_FAILURES + CF_FAILURES, + /* HWPREDICT that follows a moving baseline */ + CF_MHWPREDICT + /* new entries must come last !!! */ }; /* A binary array of failure indicators: 1 indicates @@ -192,13 +204,15 @@ enum cf_en { CF_AVERAGE = 0, /* data consolidation functions */ enum rra_par_en { RRA_cdp_xff_val = 0, /* what part of the consolidated * datapoint must be known, to produce a * valid entry in the rra */ - RRA_hw_alpha, + /* CF_HWPREDICT: */ + RRA_hw_alpha = 1, /* exponential smoothing parameter for the intercept in * the Holt-Winters prediction algorithm. */ - RRA_hw_beta, + RRA_hw_beta = 2, /* exponential smoothing parameter for the slope in * the Holt-Winters prediction algorithm. */ - RRA_dependent_rra_idx, + + RRA_dependent_rra_idx = 3, /* For CF_HWPREDICT: index of the RRA with the seasonal * effects of the Holt-Winters algorithm (of type * CF_SEASONAL). @@ -210,22 +224,30 @@ enum rra_par_en { RRA_cdp_xff_val = 0, /* what part of the consolidated * Holt-Winters prediction (of type CF_HWPREDICT). * For CF_FAILURES: index of the CF_DEVSEASONAL array. * */ - RRA_seasonal_smooth_idx, - /* For CF_SEASONAL and CF_DEVSEASONAL: - * an integer between 0 and row_count - 1 which + + /* CF_SEASONAL and CF_DEVSEASONAL: */ + RRA_seasonal_gamma = 1, + /* exponential smoothing parameter for seasonal effects. */ + + RRA_seasonal_smoothing_window = 2, + /* fraction of the season to include in the running average + * smoother */ + + /* RRA_dependent_rra_idx = 3, */ + + RRA_seasonal_smooth_idx = 4, + /* an integer between 0 and row_count - 1 which * is index in the seasonal cycle for applying * the period smoother. */ - RRA_failure_threshold, + + /* CF_FAILURES: */ + RRA_delta_pos = 1, /* confidence bound scaling parameters */ + RRA_delta_neg = 2, + /* RRA_dependent_rra_idx = 3, */ + RRA_window_len = 4, + RRA_failure_threshold = 5 /* For CF_FAILURES, number of violations within the last * window required to mark a failure. */ - RRA_seasonal_gamma = RRA_hw_alpha, - /* exponential smoothing parameter for seasonal effects. - * */ - RRA_delta_pos = RRA_hw_alpha, - RRA_delta_neg = RRA_hw_beta, - /* confidence bound scaling parameters for the - * the FAILURES RRA. */ - RRA_window_len = RRA_seasonal_smooth_idx }; /* For CF_FAILURES, the length of the window for measuring @@ -373,7 +395,8 @@ typedef struct rrd_t { stat_head_t *stat_head; /* the static header */ ds_def_t *ds_def; /* list of data source definitions */ rra_def_t *rra_def; /* list of round robin archive def */ - live_head_t *live_head; + live_head_t *live_head; /* rrd v >= 3 last_up with us */ + time_t *legacy_last_up; /* rrd v < 3 last_up time */ pdp_prep_t *pdp_prep; /* pdp data prep area */ cdp_prep_t *cdp_prep; /* cdp prep area */ rra_ptr_t *rra_ptr; /* list of rra pointers */