diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:05 +0000 |
commit | 97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch) | |
tree | 02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /collectors/proc.plugin/sys_class_infiniband.c | |
parent | Releasing debian version 1.36.1-1. (diff) | |
download | netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip |
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/proc.plugin/sys_class_infiniband.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/collectors/proc.plugin/sys_class_infiniband.c b/collectors/proc.plugin/sys_class_infiniband.c index 7e63bcbb4..fca0cb8a2 100644 --- a/collectors/proc.plugin/sys_class_infiniband.c +++ b/collectors/proc.plugin/sys_class_infiniband.c @@ -184,7 +184,7 @@ static struct ibport { RRDSET *st_hwpackets; RRDSET *st_hwerrors; - RRDSETVAR *stv_speed; + const RRDSETVAR_ACQUIRED *stv_speed; usec_t speed_last_collected_usec; @@ -543,15 +543,14 @@ int do_sys_class_infiniband(int update_every, usec_t dt) // 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 - rrdset_next(port->st_bytes); + port->stv_speed = rrdsetvar_custom_chart_variable_add_and_acquire(port->st_bytes, "link_speed"); + } // Link read values to dimensions FOREACH_COUNTER_BYTES(GEN_RRD_DIM_SETP, port) // For link speed set only variable - rrdsetvar_custom_chart_variable_set(port->stv_speed, port->speed); + rrdsetvar_custom_chart_variable_set(port->st_bytes, port->stv_speed, port->speed); rrdset_done(port->st_bytes); } @@ -578,8 +577,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) // Create Dimensions rrdset_flag_set(port->st_packets, RRDSET_FLAG_DETAIL); FOREACH_COUNTER_PACKETS(GEN_RRD_DIM_ADD, port) - } else - rrdset_next(port->st_packets); + } // Link read values to dimensions FOREACH_COUNTER_PACKETS(GEN_RRD_DIM_SETP, port) @@ -608,8 +606,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) // Create Dimensions rrdset_flag_set(port->st_errors, RRDSET_FLAG_DETAIL); FOREACH_COUNTER_ERRORS(GEN_RRD_DIM_ADD, port) - } else - rrdset_next(port->st_errors); + } // Link read values to dimensions FOREACH_COUNTER_ERRORS(GEN_RRD_DIM_SETP, port) @@ -658,8 +655,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) port->name); port->do_hwerrors = CONFIG_BOOLEAN_NO; } - } else - rrdset_next(port->st_hwerrors); + } } if (port->do_hwpackets != CONFIG_BOOLEAN_NO) { @@ -695,8 +691,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) port->name); port->do_hwpackets = CONFIG_BOOLEAN_NO; } - } else - rrdset_next(port->st_hwpackets); + } } // Update values to rrd (done by vendor-specific function) |