PSU Sensors - Associations

James Feist james.feist at linux.intel.com
Thu Oct 24 04:50:10 AEDT 2019


On 10/23/19 10:37 AM, Patrick Venture wrote:
> So, I flipped the association interface addition and the property
> initialization to match other sensors, and then it started working.  I
> was curious if you had any suggestions on how to find the matching
> sensor given the paths, for instance:
> 
> busctl get-property xyz.openbmc_project.PSUSensor
> /xyz/openbmc_project/sensors/temperature/alt2_Temperature
> xyz.openbmc_project.Association.Definitions Associations
> a(sss) 1 "chassis" "all_sensors"
> "/xyz/openbmc_project/inventory/system/board/Altie"
> 
> busctl tree --no-pager xyz.openbmc_project.EntityManager|grep Altie
>            |-/xyz/openbmc_project/inventory/system/board/Altie
>            | |-/xyz/openbmc_project/inventory/system/board/Altie/al_temp_0
>            | |-/xyz/openbmc_project/inventory/system/board/Altie/al_temp_1
>            | |-/xyz/openbmc_project/inventory/system/board/Altie/al_temp_2
>            | `-/xyz/openbmc_project/inventory/system/board/Altie/alt1
> 
> No alt2 -- so how do I know this?  I can walk every subordinate object
> to find the name match, but I was curious if you had a faster idea?

So for the associations you should generally not look at the definition, 
the definition is primarily for the mapper. You should be looking in the 
mapper for the association that matches the sensor name that you care 
about and it should point back to the configuration. If there are not 
associations for each of the sub-sensors, there should be.

> 
> Thanks,
> Patrick
> 


More information about the openbmc mailing list