]> arthur.barton.de Git - netdata.git/blobdiff - src/ipc.c
locks abstraction, error reporting, debugging
[netdata.git] / src / ipc.c
index b66d65272a917ddb31f5baefc518bdffd2a56967..1dabf5e192652ae5796acf71dd001c9027ecad54 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -184,8 +184,8 @@ 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);
@@ -193,13 +193,17 @@ int do_ipc(int update_every, usec_t dt) {
         // create the charts
         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);
+            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_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);
+            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);
         }
     }