summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin/sys_class_infiniband.c
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/proc.plugin/sys_class_infiniband.c')
-rw-r--r--collectors/proc.plugin/sys_class_infiniband.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/collectors/proc.plugin/sys_class_infiniband.c b/collectors/proc.plugin/sys_class_infiniband.c
index fca0cb8a2..5f5e53239 100644
--- a/collectors/proc.plugin/sys_class_infiniband.c
+++ b/collectors/proc.plugin/sys_class_infiniband.c
@@ -200,7 +200,7 @@ static struct ibport {
#define GEN_DO_HWCOUNTER_READ(NAME, GRP, DESC, DIR, PORT, HW, ...) \
if (HW->file_##NAME) { \
if (read_single_number_file(HW->file_##NAME, (unsigned long long *)&HW->NAME)) { \
- error("cannot read iface '%s' hwcounter '" #HW "'", PORT->name); \
+ collector_error("cannot read iface '%s' hwcounter '" #HW "'", PORT->name); \
HW->file_##NAME = NULL; \
} \
}
@@ -469,7 +469,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
snprintfz(buffer, FILENAME_MAX, "%s/%s/%s", ports_dirname, port_dent->d_name, "rate");
char buffer_rate[65];
if (read_file(buffer, buffer_rate, 64)) {
- error("Unable to read '%s'", buffer);
+ collector_error("Unable to read '%s'", buffer);
p->width = 1;
} else {
char *buffer_width = strstr(buffer_rate, "(");
@@ -480,12 +480,11 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
}
if (!p->discovered)
- info(
- "Infiniband card %s port %s at speed %" PRIu64 " width %" PRIu64 "",
- dev_dent->d_name,
- port_dent->d_name,
- p->speed,
- p->width);
+ collector_info("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;
}
@@ -511,7 +510,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
#define GEN_DO_COUNTER_READ(NAME, GRP, DESC, DIR, PORT, ...) \
if (PORT->file_##NAME) { \
if (read_single_number_file(PORT->file_##NAME, (unsigned long long *)&PORT->NAME)) { \
- error("cannot read iface '%s' counter '" #NAME "'", PORT->name); \
+ collector_error("cannot read iface '%s' counter '" #NAME "'", PORT->name); \
PORT->file_##NAME = NULL; \
} \
}
@@ -650,7 +649,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
// Unknown vendor, should not happen
else {
- error(
+ collector_error(
"Unmanaged vendor for '%s', do_hwerrors should have been set to no. Please report this bug",
port->name);
port->do_hwerrors = CONFIG_BOOLEAN_NO;
@@ -686,7 +685,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt)
// Unknown vendor, should not happen
else {
- error(
+ collector_error(
"Unmanaged vendor for '%s', do_hwpackets should have been set to no. Please report this bug",
port->name);
port->do_hwpackets = CONFIG_BOOLEAN_NO;