/*****************************************************************************
- * RRDtool 1.3rc7 Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.8.0 Copyright by Tobi Oetiker, 1997-2022
*****************************************************************************
* rrd_format.h RRD Database Format header
*****************************************************************************/
-#ifndef _RRD_FORMAT_H
-#define _RRD_FORMAT_H
+#ifndef RRD_FORMAT_H_92768FBD7A3446C58B1097BEE038159D
+#define RRD_FORMAT_H_92768FBD7A3446C58B1097BEE038159D
+
+/*
+ * _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_3853987DDF7E4709A5B5849E5A6204F4) && !defined(RRD_EXPORT_DEPRECATED)
+# error "Do not include rrd_format.h directly. Include rrd.h instead!"
+#endif
#include "rrd.h"
#define RRD_COOKIE "RRD"
/* #define RRD_VERSION "0002" */
/* changed because microsecond precision requires another field */
-#define RRD_VERSION "0004"
#define RRD_VERSION3 "0003"
-#define FLOAT_COOKIE 8.642135E130
+#define RRD_VERSION4 "0004"
+#define RRD_VERSION5 "0005"
+#define FLOAT_COOKIE ((double)8.642135E130)
typedef union unival {
unsigned long u_cnt;
* The RRD Database Structure
* ---------------------------
*
- * In oder to properly describe the database structure lets define a few
+ * In order to properly describe the database structure lets define a few
* new words:
*
* ds - Data Source (ds) providing input to the database. A Data Source (ds)
* can be a traffic counter, a temperature, the number of users logged
* into a system. The rrd database format can handle the input of
- * several Data Sources (ds) in a singe database.
+ * several Data Sources (ds) in a single database.
*
* dst - Data Source Type (dst). The Data Source Type (dst) defines the rules
* applied to Build Primary Data Points from the input provided by the
DST_ABSOLUTE,
DST_GAUGE,
DST_DERIVE,
- DST_CDEF
+ DST_CDEF,
+ DST_DCOUNTER,
+ DST_DDERIVE
};
enum ds_param_en { DS_mrhb_cnt = 0, /* minimum required heartbeat. A
/* The magic number here is one less than DS_NAM_SIZE */
#define DS_NAM_FMT "%19[a-zA-Z0-9_-]"
+#define DS_NAM_RE "[-a-zA-Z0-9_]{1,19}"
#define DS_NAM_SIZE 20
#define DST_FMT "%19[A-Z]"
+#define DST_FMT_RE "[A-Z]{1,19}"
#define DST_SIZE 20
typedef struct ds_def_t {
* For CF_FAILURES: index of the CF_DEVSEASONAL array.
* */
+ /* CF_HWPREDICT: */
+ RRA_period = 4,
+
/* CF_SEASONAL and CF_DEVSEASONAL: */
RRA_seasonal_gamma = 1,
/* exponential smoothing parameter for seasonal effects. */
RRA_delta_neg = 2,
/* RRA_dependent_rra_idx = 3, */
RRA_window_len = 4,
- RRA_failure_threshold = 5,
+ RRA_failure_threshold = 5
/* For CF_FAILURES, number of violations within the last
* window required to mark a failure. */
};
* DS updates may only occur at ever increasing points in time
* When any DS update arrives after a cdp update time, the *previous*
- update cycle gets executed. All pdps are transfered to cdps and the
+ update cycle gets executed. All pdps are transferred to cdps and the
cdps feed the rras where necessary. Only then the new DS value
is loaded into the PDP. */
* prediction algorithm. */
CDP_hw_last_intercept,
/* Last iteration intercept coefficient for the Holt-Winters
- * prediction algorihtm. */
+ * prediction algorithm. */
CDP_hw_slope,
/* Current slope coefficient for the Holt-Winters
* prediction algorithm. */
CDP_hw_last_slope,
- /* Last iteration slope coeffient. */
+ /* Last iteration slope coefficient. */
CDP_null_count,
/* Number of sequential Unknown (DNAN) values + 1 preceding
* the current prediction.
* prediction algorithm. This is stored in CDP prep to avoid
* redundant seek operations. */
CDP_hw_last_seasonal = CDP_hw_last_intercept,
- /* Last iteration seasonal coeffient. */
+ /* Last iteration seasonal coefficient. */
CDP_seasonal_deviation = CDP_hw_intercept,
CDP_last_seasonal_deviation = CDP_hw_last_intercept,
CDP_init_seasonal = CDP_null_count
cdp_prep_t *cdp_prep; /* cdp prep area */
rra_ptr_t *rra_ptr; /* list of rra pointers */
rrd_value_t *rrd_value; /* list of rrd values */
+ void *__mmap_start; /* all __ variables will be used internally */
+ long __mmap_size;
} rrd_t;
/****************************************************************************