diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2017-04-30 16:09:37 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2017-04-30 16:09:37 +0000 |
commit | 51f689a8e17ff3929acd2dbf39e936d2cd3ac723 (patch) | |
tree | 92e54f543171b69dcbc639be09d11221cf96ba28 /src/proc_softirqs.c | |
parent | New upstream version 1.5.0+dfsg (diff) | |
download | netdata-51f689a8e17ff3929acd2dbf39e936d2cd3ac723.tar.xz netdata-51f689a8e17ff3929acd2dbf39e936d2cd3ac723.zip |
New upstream version 1.6.0+dfsgupstream/1.6.0+dfsg
Diffstat (limited to 'src/proc_softirqs.c')
-rw-r--r-- | src/proc_softirqs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/proc_softirqs.c b/src/proc_softirqs.c index c7b10d70..560e2acb 100644 --- a/src/proc_softirqs.c +++ b/src/proc_softirqs.c @@ -58,7 +58,7 @@ int do_proc_softirqs(int update_every, usec_t dt) { if(unlikely(!ff)) { char filename[FILENAME_MAX + 1]; - snprintfz(filename, FILENAME_MAX, "%s%s", global_host_prefix, "/proc/softirqs"); + snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/proc/softirqs"); ff = procfile_open(config_get("plugin:proc:/proc/softirqs", "filename to monitor", filename), " \t", PROCFILE_FLAG_DEFAULT); if(unlikely(!ff)) return 1; } @@ -128,8 +128,9 @@ int do_proc_softirqs(int update_every, usec_t dt) { // -------------------------------------------------------------------- - st = rrdset_find_bytype("system", "softirqs"); - if(unlikely(!st)) st = rrdset_create("system", "softirqs", NULL, "softirqs", NULL, "System softirqs", "softirqs/s", 950, update_every, RRDSET_TYPE_STACKED); + st = rrdset_find_bytype_localhost("system", "softirqs"); + if(unlikely(!st)) st = rrdset_create_localhost("system", "softirqs", NULL, "softirqs", NULL, "System softirqs" + , "softirqs/s", 950, update_every, RRDSET_TYPE_STACKED); else rrdset_next(st); for(l = 0; l < lines ;l++) { @@ -141,7 +142,7 @@ int do_proc_softirqs(int update_every, usec_t dt) { if(unlikely(!irr->rd || strncmp(irr->name, irr->rd->name, MAX_INTERRUPT_NAME) != 0)) { irr->rd = rrddim_find(st, irr->id); if(unlikely(!irr->rd)) - irr->rd = rrddim_add(st, irr->id, irr->name, 1, 1, RRDDIM_INCREMENTAL); + irr->rd = rrddim_add(st, irr->id, irr->name, 1, 1, RRD_ALGORITHM_INCREMENTAL); else rrddim_set_name(st, irr->rd, irr->name); @@ -163,7 +164,7 @@ int do_proc_softirqs(int update_every, usec_t dt) { char id[50+1]; snprintfz(id, 50, "cpu%d_softirqs", c); - st = rrdset_find_bytype("cpu", id); + st = rrdset_find_bytype_localhost("cpu", id); if(unlikely(!st)) { // find if everything is zero unsigned long long core_sum = 0 ; @@ -176,7 +177,8 @@ int do_proc_softirqs(int update_every, usec_t dt) { char title[100+1]; snprintfz(title, 100, "CPU%d softirqs", c); - st = rrdset_create("cpu", id, NULL, "softirqs", "cpu.softirqs", title, "softirqs/s", 3000 + c, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create_localhost("cpu", id, NULL, "softirqs", "cpu.softirqs", title, "softirqs/s", 3000 + c + , update_every, RRDSET_TYPE_STACKED); } else rrdset_next(st); @@ -186,7 +188,7 @@ int do_proc_softirqs(int update_every, usec_t dt) { if(unlikely(!irr->cpu[c].rd)) { irr->cpu[c].rd = rrddim_find(st, irr->id); if(unlikely(!irr->cpu[c].rd)) - irr->cpu[c].rd = rrddim_add(st, irr->id, irr->name, 1, 1, RRDDIM_INCREMENTAL); + irr->cpu[c].rd = rrddim_add(st, irr->id, irr->name, 1, 1, RRD_ALGORITHM_INCREMENTAL); else rrddim_set_name(st, irr->cpu[c].rd, irr->name); } |