#ifndef _TESTDATA_H
#define _TESTDATA_H
-#include "draw_graphs.h"
+#include "rrdtool.h"
#include "scheduler.h"
#include "parser.h"
0
};
+struct rrd_data_source cpumem_sources[] = {
+ {
+ .name = "User",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "User",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "Sys",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "Idle",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "Wait",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "IRQ",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "SoftIRQ",
+ .type = "COUNTER",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 1200,
+ },
+ {
+ .name = "Free",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Buffers",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Cached",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Active",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Inactive",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "SwapFree",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Anon",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Slab",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Tables",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {
+ .name = "Swap",
+ .type = "GAUGE",
+ .heartbeat = 240,
+ .min = 0,
+ .max = 32768,
+ },
+ {},
+};
+
+struct rrd_archive cpumem_archives[] = {
+ {
+ .type = "AVERAGE",
+ .xff = 0.5,
+ .steps = 1,
+ .rows = 720,
+ },
+ {
+ .type = "AVERAGE",
+ .xff = 0.5,
+ .steps = 7,
+ .rows = 720,
+ },
+ {
+ .type = "AVERAGE",
+ .xff = 0.5,
+ .steps = 31,
+ .rows = 720,
+ },
+ {
+ .type = "AVERAGE",
+ .xff = 0.5,
+ .steps = 365,
+ .rows = 720,
+ },
+ {
+ .type = "MIN",
+ .xff = 0.5,
+ .steps = 1,
+ .rows = 720,
+ },
+ {
+ .type = "MIN",
+ .xff = 0.5,
+ .steps = 7,
+ .rows = 720,
+ },
+ {
+ .type = "MIN",
+ .xff = 0.5,
+ .steps = 31,
+ .rows = 720,
+ },
+ {
+ .type = "MIN",
+ .xff = 0.5,
+ .steps = 365,
+ .rows = 720,
+ },
+ {
+ .type = "MAX",
+ .xff = 0.5,
+ .steps = 1,
+ .rows = 720,
+ },
+ {
+ .type = "MAX",
+ .xff = 0.5,
+ .steps = 7,
+ .rows = 720,
+ },
+ {
+ .type = "MAX",
+ .xff = 0.5,
+ .steps = 31,
+ .rows = 720,
+ },
+ {
+ .type = "MAX",
+ .xff = 0.5,
+ .steps = 365,
+ .rows = 720,
+ },
+ {},
+};
+
static struct rrd_database cpumem_rrd = {
.filename = SYSINFO_RRD_PATH,
.interval = 120,
.parse = cpu_mem_parser,
.images = (struct rrd_image **)&cpu_mem_images,
- .name = "cpumem"
+ .sources = cpumem_sources,
+ .archives = cpumem_archives,
+ .name = "cpumem",
};
static struct rrd_database systemp_rrd = {
.interval = 300,
.parse = NULL,
.images = (struct rrd_image **)&systemp_images,
- .name = "systemp"
+ .name = "systemp",
};
static struct rrd_database *all_rrds[] = {