]> git.itanic.dy.fi Git - rrdd/commitdiff
Merge branch 'master' into kaatokone0
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 22 Feb 2012 20:29:58 +0000 (22:29 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 22 Feb 2012 20:47:39 +0000 (22:47 +0200)
Conflicts:
database.h

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
1  2 
database.h

diff --cc database.h
index 1c5f827633130a120a2d030c2de3364901a8fa54,0c171f074c544df0f064d5c5c4defd098a3a1324..d96a037d8779b06caa4cfb33beb1eb8e20238a90
@@@ -6,16 -6,13 +6,17 @@@
  #include "parser.h"
  
  const char blank[] = "COMMENT:       ";
 +#define tempfmt "% 6.2lf °C"
 +
  #define numfmt " % 8.2lf "
  
 -#define SYSINFO_PATH          "./"
 +#define SYSINFO_PATH          "/home/kaapeli/sysinfo/"
  #define SYSINFO_RRD_PATH      SYSINFO_PATH "sysinfo.rrd"
  #define SYSINFO_IMAGES_PATH   SYSINFO_PATH "images/"
++#define TEMP_IMAGES_PATH      "/home/apache2/temperature/"
  
 -#define SYSTEMP_RRD_PATH      "/root/systemp/systemp.rrd"
 +#define DIGITEMP_RRD_PATH     "/home/kaapeli/digitemp/digitemp.rrd"
 +#define HDTEMP_RRD_PATH               "/root/hdtemp/hdtemp.rrd"
  
  #define NETWORK_RRD_PATH      SYSINFO_PATH "network.rrd"
  
@@@ -345,13 -295,11 +353,13 @@@ const char *hdcpu_options[] = 
                .text = (char **)&rrdname ## text,                      \
        };
  
- DEFINE_IMAGE(cpu,     "/home/kaapeli/sysinfo/images/cpu", 720, 480, 1);
- DEFINE_IMAGE(mem,     "/home/kaapeli/sysinfo/images/mem", 720, 480, 1);
- DEFINE_IMAGE(eth0,    "/home/kaapeli/sysinfo/images/eth0", 720, 200, 1);
- DEFINE_IMAGE(eth1,    "/home/kaapeli/sysinfo/images/eth1", 720, 200, 1);
- DEFINE_IMAGE(sensor2_,        "/home/apache2/temperature/sensor2", 600, 200, 2);
- DEFINE_IMAGE(sensor3_,        "/home/apache2/temperature/sensor1-3", 600, 200, 2);
- DEFINE_IMAGE(hdcpu_,  "/home/apache2/temperature/hdcpu", 600, 200, 2);
 -DEFINE_IMAGE(cpu,     SYSINFO_PATH "/images/cpu", 720, 480, 1);
 -DEFINE_IMAGE(mem,     SYSINFO_PATH "/images/mem", 720, 480, 1);
 -DEFINE_IMAGE(systemp, SYSINFO_PATH "/images/systemp", 720,480,1);
 -DEFINE_IMAGE(eth0,    SYSINFO_PATH "/images/eth0", 720, 200, 1);
 -DEFINE_IMAGE(eth1,    SYSINFO_PATH "/images/eth1", 720, 200, 1);
++DEFINE_IMAGE(cpu,     SYSINFO_IMAGES_PATH "cpu", 720, 480, 1);
++DEFINE_IMAGE(mem,     SYSINFO_IMAGES_PATH "mem", 720, 480, 1);
++DEFINE_IMAGE(eth0,    SYSINFO_IMAGES_PATH "eth0", 720, 200, 1);
++DEFINE_IMAGE(eth1,    SYSINFO_IMAGES_PATH "eth1", 720, 200, 1);
++DEFINE_IMAGE(sensor2_,        TEMP_IMAGES_PATH "sensor2", 600, 200, 2);
++DEFINE_IMAGE(sensor3_,        TEMP_IMAGES_PATH "sensor1-3", 600, 200, 2);
++DEFINE_IMAGE(hdcpu_,  TEMP_IMAGES_PATH "hdcpu", 600, 200, 2);
  
  static struct rrd_image *cpu_mem_images[] = {
        &cpudaily,
@@@ -483,24 -420,18 +492,26 @@@ static struct rrd_database cpumem_rrd 
        .filename       = SYSINFO_RRD_PATH,
        .interval       = 120,
        .parse          = cpu_mem_parser,
 -      .images         = (struct rrd_image **)&cpu_mem_images,
+       .sources        = cpumem_sources,
+       .archives       = cpumem_archives,
 -      .name           = "cpumem",
 +      .images         = (struct rrd_image **)&cpu_mem_images,
 +      .name           = "cpumem"
 +};
 +
 +static struct rrd_database digitemp_rrd = {
 +      .filename       = DIGITEMP_RRD_PATH,
 +      .interval       = 300,
 +      .parse          = digitemp_parser_mod,
 +      .images         = (struct rrd_image **)&temp_images,
 +      .name           = "digitemp",
  };
  
 -static struct rrd_database systemp_rrd = {
 +static struct rrd_database hdtemp_rrd = {
 +      .filename       = HDTEMP_RRD_PATH,
        .interval       = 300,
 -      .parse          = NULL,
 -      .filename       = NULL,
 -      .images         = (struct rrd_image **)&systemp_images,
 -      .name           = "systemp",
 +      .parse          = 0,
 +      .images         = (struct rrd_image **)&hdcpu_images,
 +      .name           = "hdtemp",
  };
  
  char *network_interfaces[] = {