Mapping standard D-Bus sensors to ProcessorMetrics (and other specific schemas)

Patrick Williams patrick at stwcx.xyz
Fri Apr 9 22:05:53 AEST 2021


On Wed, Apr 07, 2021 at 02:24:55PM +0200, Ambrozewicz, Adrian wrote:
> Question of extending xyz.openbmc_project.Sensor.Value interface (so it 
> allows for more types or nested paths, if necessary) is something  I 
> know should be considered, but seems like more or less straightforward 
> to address.

I suspect this would be the more difficult direction to go down.  There
is already enough code that looks for sensors at specific paths that
you'd have to track down and fix up.  Also, there has been some concern
by some maintainers in other cases about having information in the paths
have meaning and prefering to reduce the reliance on that.

> There is bigger issue I see now - mapping D-Bus sensors to concrete 
> Redfish properties. Mapping sensors at inventory level is sorted out 
> with use of xyz.openbmc_project.Association.Definitions interface. 
> However - I don't see (or know of) any method to link given D-Bus sensor 
> with it's designated place in Redfish schema.

I think associations are the right approach to link sensors with
inventory items.  There is a design document underway to define some of
those assocations for inventory items and it seems like your needs
should be an extension to that.

https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/41468/4/architecture/dbus-inventory.md

> I've done some PoC implementation of ProcessorMetrics, which relies on 
> new D-Bus interface with 'Mapping' property (eg. 'TemperatureCelsius' or 
> 'CoreMetrics/12/UnhaltedCycles'). ProcessorMetrics node implementation 
> queries D-Bus for all sensors associated with given CPU and populates 
> properties if proper mapping was found.

I'm not really grasping what the contents of this mapping property are.
Generally we want to stay away from free-form strings having programatic
uses.  Maybe if you can define these mappings as enumerations?

What is the additional information you need besides the assocation from
a sensor to its inventory item?

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210409/8a109d98/attachment.sig>


More information about the openbmc mailing list