summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--collectors/proc.plugin/ipc.c (renamed from src/ipc.c)22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/ipc.c b/collectors/proc.plugin/ipc.c
index a9076fca4..6c6bee519 100644
--- a/src/ipc.c
+++ b/collectors/proc.plugin/ipc.c
@@ -1,4 +1,6 @@
-#include "common.h"
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "plugin_proc.h"
#include <sys/sem.h>
#include <sys/msg.h>
@@ -166,7 +168,7 @@ int do_ipc(int update_every, usec_t dt) {
static int initialized = 0, read_limits_next = -1;
static struct ipc_limits limits;
static struct ipc_status status;
- static RRDSETVAR *arrays_max = NULL, *semaphores_max = NULL;
+ static RRDVAR *arrays_max = NULL, *semaphores_max = NULL;
static RRDSET *st_semaphores = NULL, *st_arrays = NULL;
static RRDDIM *rd_semaphores = NULL, *rd_arrays = NULL;
@@ -195,9 +197,9 @@ int do_ipc(int update_every, usec_t dt) {
, NULL
, "IPC Semaphores"
, "semaphores"
- , "linux"
+ , PLUGIN_PROC_NAME
, "ipc"
- , 1000
+ , NETDATA_CHART_PRIO_SYSTEM_IPC_SEMAPHORES
, localhost->rrd_update_every
, RRDSET_TYPE_AREA
);
@@ -213,9 +215,9 @@ int do_ipc(int update_every, usec_t dt) {
, NULL
, "IPC Semaphore Arrays"
, "arrays"
- , "linux"
+ , PLUGIN_PROC_NAME
, "ipc"
- , 1000
+ , NETDATA_CHART_PRIO_SYSTEM_IPC_SEM_ARRAYS
, localhost->rrd_update_every
, RRDSET_TYPE_AREA
);
@@ -223,8 +225,8 @@ int do_ipc(int update_every, usec_t dt) {
}
// variables
- semaphores_max = rrdsetvar_custom_chart_variable_create(st_semaphores, "ipc.semaphores.max");
- arrays_max = rrdsetvar_custom_chart_variable_create(st_arrays, "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");
}
if(unlikely(read_limits_next < 0)) {
@@ -232,8 +234,8 @@ int do_ipc(int update_every, usec_t dt) {
error("Unable to fetch semaphore limits.");
}
else {
- if(semaphores_max) rrdsetvar_custom_chart_variable_set(semaphores_max, limits.semmns);
- if(arrays_max) rrdsetvar_custom_chart_variable_set(arrays_max, limits.semmni);
+ if(semaphores_max) rrdvar_custom_host_variable_set(localhost, semaphores_max, limits.semmns);
+ if(arrays_max) rrdvar_custom_host_variable_set(localhost, arrays_max, limits.semmni);
st_arrays->red = limits.semmni;
st_semaphores->red = limits.semmns;