summaryrefslogtreecommitdiffstats
path: root/src/ipc.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-04-30 16:09:37 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-04-30 18:09:45 +0000
commitbed7e5b6a0b9ea0ddfc76c6f77eb91df81b92521 (patch)
tree519e5945ec0db75bfb50583539caa408a5819e87 /src/ipc.c
parentTemporarily disable signature checking (diff)
downloadnetdata-bed7e5b6a0b9ea0ddfc76c6f77eb91df81b92521.tar.xz
netdata-bed7e5b6a0b9ea0ddfc76c6f77eb91df81b92521.zip
New upstream version 1.6.0+dfsg
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/ipc.c b/src/ipc.c
index a5ab342d..1dabf5e1 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -57,7 +57,7 @@ static inline int ipc_sem_get_limits(struct ipc_limits *lim) {
static char filename[FILENAME_MAX + 1] = "";
if(unlikely(!filename[0]))
- snprintfz(filename, FILENAME_MAX, "%s/proc/sys/kernel/sem", global_host_prefix);
+ snprintfz(filename, FILENAME_MAX, "%s/proc/sys/kernel/sem", netdata_configured_host_prefix);
if(unlikely(!ff)) {
ff = procfile_open(filename, NULL, PROCFILE_FLAG_DEFAULT);
@@ -184,23 +184,27 @@ int do_ipc(int update_every, usec_t dt) {
return 1;
}
- arrays_max = rrdvar_custom_host_variable_create(&localhost, "ipc.semaphores.arrays.max");
- semaphores_max = rrdvar_custom_host_variable_create(&localhost, "ipc.semaphores.max");
+ arrays_max = rrdvar_custom_host_variable_create(localhost, "ipc.semaphores.arrays.max");
+ semaphores_max = rrdvar_custom_host_variable_create(localhost, "ipc.semaphores.max");
if(arrays_max) rrdvar_custom_host_variable_set(arrays_max, limits.semmni);
if(semaphores_max) rrdvar_custom_host_variable_set(semaphores_max, limits.semmns);
// create the charts
- semaphores = rrdset_find("system.ipc_semaphores");
+ semaphores = rrdset_find_localhost("system.ipc_semaphores");
if(!semaphores) {
- semaphores = rrdset_create("system", "ipc_semaphores", NULL, "ipc semaphores", NULL, "IPC Semaphores", "semaphores", 1000, rrd_update_every, RRDSET_TYPE_AREA);
- rrddim_add(semaphores, "semaphores", NULL, 1, 1, RRDDIM_ABSOLUTE);
+ semaphores = rrdset_create_localhost("system", "ipc_semaphores", NULL, "ipc semaphores", NULL
+ , "IPC Semaphores", "semaphores", 1000, localhost->rrd_update_every
+ , RRDSET_TYPE_AREA);
+ rrddim_add(semaphores, "semaphores", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
- arrays = rrdset_find("system.ipc_semaphore_arrays");
+ arrays = rrdset_find_localhost("system.ipc_semaphore_arrays");
if(!arrays) {
- arrays = rrdset_create("system", "ipc_semaphore_arrays", NULL, "ipc semaphores", NULL, "IPC Semaphore Arrays", "arrays", 1000, rrd_update_every, RRDSET_TYPE_AREA);
- rrddim_add(arrays, "arrays", NULL, 1, 1, RRDDIM_ABSOLUTE);
+ arrays = rrdset_create_localhost("system", "ipc_semaphore_arrays", NULL, "ipc semaphores", NULL
+ , "IPC Semaphore Arrays", "arrays", 1000, localhost->rrd_update_every
+ , RRDSET_TYPE_AREA);
+ rrddim_add(arrays, "arrays", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
}