]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_interrupts.c
added config options for all /proc and /sys filenames monitored required for #10
[netdata.git] / src / proc_interrupts.c
index 4baecf0b2e57e3127b0f7f2bb5f623419f9a2643..a2c7f4714bb7fafd24266d10b72f217769799351 100755 (executable)
@@ -4,6 +4,7 @@
 #include <string.h>
 #include <ctype.h>
 
+#include "common.h"
 #include "config.h"
 #include "procfile.h"
 #include "rrd.h"
@@ -28,9 +29,9 @@ int do_proc_interrupts(int update_every, unsigned long long dt) {
 
        if(dt) {};
 
-       if(do_per_core == -1) do_per_core = config_get_boolean("plugin:proc:/proc/interrupts", "interrupts per core", 1);
+       if(do_per_core == -1) do_per_core = config_get_boolean("plugin:proc:/proc/interrupts", "interrupts per core", 0);
 
-       if(!ff) ff = procfile_open("/proc/interrupts", " \t", PROCFILE_FLAG_DEFAULT);
+       if(!ff) ff = procfile_open(config_get("plugin:proc:/proc/interrupts", "filename to monitor", "/proc/interrupts"), " \t", PROCFILE_FLAG_DEFAULT);
        if(!ff) return 1;
 
        ff = procfile_readall(ff);