#858886 freeipmi-tools: Exit code 1 and "ipmi_sensor_read: success" message on stdout

Package:
freeipmi-tools
Source:
freeipmi
Description:
GNU implementation of the IPMI protocol - tools
Submitter:
stefanb
Date:
2026-10-15 17:39:42 UTC
Severity:
important
Tags:
#858886#5
Date:
2017-03-28 08:58:41 UTC
From:
To:
When running ipmi-sensors as root on a Dell DSS7500 server,
it outputs good info on stdout but exit code 1 is returned
from the binary. This is obviously a problem for example
when using it with nagios that uses the exit code in order
to send alert or not

#858886#10
Date:
2022-02-17 11:45:57 UTC
From:
To:
Can you tell me if this issue is still reproducible on latest version
please?

#858886#19
Date:
2026-10-10 15:07:39 UTC
From:
To:
Hi,

I looked into this again. The cause is still present in the current
version (1.6.20), so there is no need to retest.

When a sensor in the SDR has an event/reading type code that FreeIPMI
doesn't recognize (0x00 or a reserved value), libfreeipmi's
ipmi_sensor_read() returns "no reading" without setting an error code.
ipmi-sensors then treats it as a generic failure, prints
"ipmi_sensor_read: success" (on stderr) and exits with status 1, even
though all the other sensors are printed correctly.

I have reported it upstream with a suggested fix:
https://github.com/chu11/freeipmi-mirror/issues/85

Until it is fixed, a possible workaround for monitoring is to exclude
the affected sensor with --exclude-record-ids.

I'm lowering the severity to normal, since the tool still works and the
issue only shows up with some SDRs.

Regards,
Fabio