commit | 7243217b80ab755615dab266ac242f7b5a8ade96 | [log] [tgz] |
---|---|---|
author | Josh Lehan <krellan@google.com> | Wed Mar 17 13:35:43 2021 -0700 |
committer | Josh Lehan <krellan@google.com> | Fri Apr 02 03:19:58 2021 -0700 |
tree | 7049e25050a24a06b106d00ae329297a92f875a2 | |
parent | ffe1834826cd45d3021ca489ada7fe7c5278769e [diff] |
Add timer expiration feature to ExternalSensor ExternalSensor now functions as intended, wholly within dbus-sensors, without requiring any modification to the IPMI or Redfish servers, to provide the feature of timeout expiration of external data, so that stale/lost external connections can be properly indicated as such. A "Timeout" parameter is added, in decimal seconds, providing a watchdog for the arrival of external data. The expectation is that the external source will provide D-Bus updates, to the sensor Value property, at regular intervals, repeating indefinitely. If this external source stops doing this, the watchdog barks, and the Value of this Sensor will become set to "NaN". This provides an indication to consumers of this Sensor, to realize that the Value of this sensor has became stale/disconnected. A practical application of this is fan control. Upon loss of external temperature notification, the fans could be thrown into failsafe mode, instead of risking the system overheating by wrongly continuing to believe an old temperature value that has become stale. Tested: Works for me. I started an external data source, data arrived into the Value of the sensor. I stopped that external data source, after the Timeout period, the Value became "NaN". I started the external source again, the Value became correct again, as soon as external data started to arrive again. I repeated this stop and start procedure a few times, verifying that it operated as intended. Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I53b9ff4c0aa771aff4aaf3449fcab23c07afa296
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.
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