PSUSensor: improve error logging

PSU sub-events might be asserted by to different alarm flags as returned
by the kernel so when debugging a hardware or driver issue it's
important to know what condition exactly triggered.

Same about errors reading data from PMBUS sensors, for debugging it's
essential to learn precisely what happened.

Example output:

System error 11 (Resource temporarily unavailable) reading from /sys/class/hwmon/hwmon12/temp1_input, line: 199
PSUSubEvent asserted by /sys/class/hwmon/hwmon10/curr3_crit_alarm
PSUSubEvent asserted by /sys/class/hwmon/hwmon12/curr3_crit_alarm
System error 6 (No such device or address) reading from /sys/class/hwmon/hwmon8/curr3_input, line: 199
PSUSubEvent asserted by /sys/class/hwmon/hwmon15/curr3_crit_alarm

Monitoring with strace confirms psusensor happily continues to read from
the file descriptors in question after the glitches.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Change-Id: I2f1adac52ad8393d455c3c1a04e7f9bac479f68f
2 files changed
tree: d0a7d09d549bf37492acb032061247272c83feac
  1. include/
  2. service_files/
  3. src/
  4. subprojects/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .clang-tidy
  9. .gitignore
  10. Jenkinsfile
  11. LICENSE
  12. MAINTAINERS
  13. meson.build
  14. meson_options.txt
  15. README.md
README.md

dbus-sensors

dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.

key features

  • runtime re-configurable from d-bus (entity-manager or the like)

  • isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible

  • async single-threaded: uses sdbusplus/asio bindings

  • multiple data inputs: hwmon, d-bus, direct driver access

sensor documentation