summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/proc.plugin')
-rw-r--r--collectors/proc.plugin/plugin_proc.h23
-rw-r--r--collectors/proc.plugin/sys_class_infiniband.c10
2 files changed, 7 insertions, 26 deletions
diff --git a/collectors/proc.plugin/plugin_proc.h b/collectors/proc.plugin/plugin_proc.h
index 18714b548..60a5a78a2 100644
--- a/collectors/proc.plugin/plugin_proc.h
+++ b/collectors/proc.plugin/plugin_proc.h
@@ -5,25 +5,9 @@
#include "daemon/common.h"
-#if (TARGET_OS == OS_LINUX)
-
-#define NETDATA_PLUGIN_HOOK_LINUX_PROC \
- { \
- .name = "PLUGIN[proc]", \
- .config_section = CONFIG_SECTION_PLUGINS, \
- .config_name = "proc", \
- .enabled = 1, \
- .thread = NULL, \
- .init_routine = NULL, \
- .start_routine = proc_main \
- },
-
-
#define PLUGIN_PROC_CONFIG_NAME "proc"
#define PLUGIN_PROC_NAME PLUGIN_PROC_CONFIG_NAME ".plugin"
-extern void *proc_main(void *ptr);
-
extern int do_proc_net_dev(int update_every, usec_t dt);
extern int do_proc_net_wireless(int update_every, usec_t dt);
extern int do_proc_diskstats(int update_every, usec_t dt);
@@ -74,11 +58,4 @@ extern void netdev_rename_device_del(const char *host_device);
#include "proc_pressure.h"
#include "zfs_common.h"
-#else // (TARGET_OS == OS_LINUX)
-
-#define NETDATA_PLUGIN_HOOK_LINUX_PROC
-
-#endif // (TARGET_OS == OS_LINUX)
-
-
#endif /* NETDATA_PLUGIN_PROC_H */
diff --git a/collectors/proc.plugin/sys_class_infiniband.c b/collectors/proc.plugin/sys_class_infiniband.c
index 1a75ce13f..7e63bcbb4 100644
--- a/collectors/proc.plugin/sys_class_infiniband.c
+++ b/collectors/proc.plugin/sys_class_infiniband.c
@@ -481,8 +481,11 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
if (!p->discovered)
info(
- "Infiniband card %s port %s at speed %lu width %lu", dev_dent->d_name, port_dent->d_name,
- p->speed, p->width);
+ "Infiniband card %s port %s at speed %" PRIu64 " width %" PRIu64 "",
+ dev_dent->d_name,
+ port_dent->d_name,
+ p->speed,
+ p->width);
p->discovered = 1;
}
@@ -537,7 +540,8 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
rrdset_flag_set(port->st_bytes, RRDSET_FLAG_DETAIL);
// On this chart, we want to have a KB/s so the dashboard will autoscale it
// The reported values are also per-lane, so we must multiply it by the width
- FOREACH_COUNTER_BYTES(GEN_RRD_DIM_ADD_CUSTOM, port, 8 * port->width, 1024, RRD_ALGORITHM_INCREMENTAL)
+ // x4 lanes multiplier as per Documentation/ABI/stable/sysfs-class-infiniband
+ FOREACH_COUNTER_BYTES(GEN_RRD_DIM_ADD_CUSTOM, port, 4 * 8 * port->width, 1024, RRD_ALGORITHM_INCREMENTAL)
port->stv_speed = rrdsetvar_custom_chart_variable_create(port->st_bytes, "link_speed");
} else