All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Fertser <fercerpav@gmail.com>
To: "Scron Chang (張仲延)" <Scron.Chang@quantatw.com>
Cc: openbmc@lists.ozlabs.org
Subject: Re: The entityID and entityInstance always be 0.1.
Date: Thu, 18 Aug 2022 14:38:57 +0300	[thread overview]
Message-ID: <Yv4k0WIuZ3Z5vdRq@home.paul.comp> (raw)
In-Reply-To: <HK0PR04MB25640ECCDEBE6D56436E8C1B869D9@HK0PR04MB2564.apcprd04.prod.outlook.com>

Hi,

On Fri, Feb 26, 2021 at 02:39:51AM +0000, Scron Chang (張仲延) wrote:
> In my case, the BMC uses intel-ipmi-oem, entity-manager, and dbus-sensors to manage the motherboard's sensors.
> I intend to retrieve entityID and entityInstance via IPMI command, e.g., ipmitool sensor get <sensor name>.
> However, intel-ipmi-oem always tries to find the sensor's "entityID" and "entityInstance" from its entity-manager entry. 
> (please refer to
> https://github.com/openbmc/intel-ipmi-oem/blob/09701efa93f2e9b25b19c4560db60c1878ef8a9c/include/sdrutils.hpp#L438 and
> https://github.com/openbmc/intel-ipmi-oem/blob/09701efa93f2e9b25b19c4560db60c1878ef8a9c/include/sdrutils.hpp#L470) 
> 
> It seems like the entity-manager should create these two attributes consumed by intel-ipmi-oem, but schema doesn't include them.
> Besides, entity-manager doesn't create "entityID" and "entityInstance" by itself.
> I'm curious how initially entity-manager or intel-ipmi-oem plans to implement this feature.

If you add the needed interface to your board json file EM will
automatically create it on D-Bus and intel-ipmi-oem will be able to
find it via the associations, e.g. add

        "xyz.openbmc_project.Inventory.Decorator.Ipmi": {
            "EntityId": 7,
            "EntityInstance": 1
        }

to the main Exposes section and you'll be able to observe it with

busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/board/<your board>

If there exists /xyz/openbmc_project/inventory/system/board/<your board>/<sensorname>
then its first xyz.openbmc_project.Configuration.* interface is
checked and if it contains EntityId or EntityInstance that'll be
preferred. You can simply add them to a specific sensor's json
section, however this is going to work only if <sensorname> matches
exactly, so if more than one sensor is created from a single entry the
override won't happen (e.g. "C3_P12V_IOUT" won't use the value for
"C3_P12V").

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com

      reply	other threads:[~2022-08-18 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26  2:39 The entityID and entityInstance always be 0.1 Scron Chang (張仲延)
2022-08-18 11:38 ` Paul Fertser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yv4k0WIuZ3Z5vdRq@home.paul.comp \
    --to=fercerpav@gmail.com \
    --cc=Scron.Chang@quantatw.com \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.