Where: src/main/java/org/metricshub/ipmi/client/IpmiResultConverter.java (getThresholdValue, getAvailableThreshold, extractFullSensorReadingValue), src/main/java/org/metricshub/ipmi/client/runner/GetSensorsRunner.java (buildStates, buildOemState), src/main/java/org/metricshub/ipmi/core/coding/commands/sdr/record/FullSensorRecord.java (calcFormula).
What happens:
- A threshold of 0 is reported as missing.
getThresholdValue() emits an empty field whenever the decoded threshold is 0.0, and getAvailableThreshold() skips such thresholds to fall back to the next one. A real threshold of 0 (a lower fan threshold of 0 RPM, a lower temperature threshold of 0 °C) is therefore reported as absent, or replaced by the next threshold of the fallback chain. FullSensorRecord leaves undefined and unreadable thresholds at 0.0, so the two cases cannot be told apart.
- Full records with no analog reading produce reading lines. When the data format of Sensor Units 1 is
11b (IPMI 2.0 Table 43-1: no analog reading), calcFormula() still converts the reading byte as an unsigned value, and IpmiResultConverter emits a Temperature/Voltage/Fan/Current/PowerConsumption/Energy line with a value that the BMC does not define as a reading.
- OEM sensors with one state byte get no state. For event/reading type
7Fh, buildOemState() requires 4 response bytes and throws otherwise; buildStates() turns the exception into an empty state. The second state byte (states 8-14) is optional in Get Sensor Reading, so a valid 3-byte response loses the state of the sensor.
Evidence: by the code and the specification (found by Codex while reviewing #124); not reproduced on the test BMCs.
Suggested fix: keep the availability of each threshold (the readable mask of byte 19, and the access support of byte 12) next to its value and test that instead of 0.0; skip the reading (keep the states) of Full records whose data format is 11b; format the available state byte(s) of OEM sensors (0xLL with one byte). Unit tests for each case.
Related: #82, #83 (threshold decoding), #110 (unavailable readings).
Where:
src/main/java/org/metricshub/ipmi/client/IpmiResultConverter.java(getThresholdValue,getAvailableThreshold,extractFullSensorReadingValue),src/main/java/org/metricshub/ipmi/client/runner/GetSensorsRunner.java(buildStates,buildOemState),src/main/java/org/metricshub/ipmi/core/coding/commands/sdr/record/FullSensorRecord.java(calcFormula).What happens:
getThresholdValue()emits an empty field whenever the decoded threshold is0.0, andgetAvailableThreshold()skips such thresholds to fall back to the next one. A real threshold of 0 (a lower fan threshold of 0 RPM, a lower temperature threshold of 0 °C) is therefore reported as absent, or replaced by the next threshold of the fallback chain.FullSensorRecordleaves undefined and unreadable thresholds at0.0, so the two cases cannot be told apart.11b(IPMI 2.0 Table 43-1: no analog reading),calcFormula()still converts the reading byte as an unsigned value, andIpmiResultConverteremits aTemperature/Voltage/Fan/Current/PowerConsumption/Energyline with a value that the BMC does not define as a reading.7Fh,buildOemState()requires 4 response bytes and throws otherwise;buildStates()turns the exception into an empty state. The second state byte (states 8-14) is optional in Get Sensor Reading, so a valid 3-byte response loses the state of the sensor.Evidence: by the code and the specification (found by Codex while reviewing #124); not reproduced on the test BMCs.
Suggested fix: keep the availability of each threshold (the readable mask of byte 19, and the access support of byte 12) next to its value and test that instead of
0.0; skip the reading (keep the states) of Full records whose data format is11b; format the available state byte(s) of OEM sensors (0xLLwith one byte). Unit tests for each case.Related: #82, #83 (threshold decoding), #110 (unavailable readings).