Faking Sensor Readings

James Feist james.feist at linux.intel.com
Fri Dec 13 02:57:17 AEDT 2019


On 12/11/19 9:28 PM, rgrs wrote:
> Hi James,
> 
> Thanks for the help.
> 
> One more clarification please,
> 
> How is entity-manager different from phoshor-hwmon conf files?
> 

Entity-manager does runtime detection based on available d-bus 
properties. In most cases it's based on Fru Detection, but anything on 
d-bus can be used to configure. So you can write Probe statements (at 
the bottom of the configuration files in most cases) that say when this 
key/value pair exists on d-bus, install this configuration. This is most 
useful for add-in-cards or other removable devices, so that when it 
exists, the configuration gets loaded. For example this retimer card 
https://github.com/openbmc/entity-manager/blob/master/configurations/PCIE%20SSD%20Retimer.json 
says when a Fru Exists with BOARD_PRODUCT_NAME set to a specific value, 
then load these sensors. It can then export sensors to sysfs as well if 
needed. Entity-manager is also not limited to sensors, it also 
configures things like phosphor-pid-control 
https://github.com/openbmc/entity-manager/blob/7d807754cc9153b04b599804464edd9654d7a81e/configurations/WFT%20Baseboard.json#L1678. 
We use it specifically so we can use 1 binary for multiple baseboards 
assuming similar i2c topology. At a high-level view, it takes JSON and 
when appropriate fields are available on d-bus, puts a system 
configuration on d-bus, along with being able to export some i2c devices.

Hope this helps

-James



More information about the openbmc mailing list