Is there any tool to query dbus interface property?

Yong Li yong.b.li at linux.intel.com
Thu Jan 4 00:42:14 AEDT 2018


Thanks for your information.

What I want is to wait for a property to be an expected value. 
For example, wait for pgood to be 1, to make sure the power is on.

Let me check on the mapper wait command......

Thanks,
Yong

-----Original Message-----
From: Andrew Geissler [mailto:geissonator at gmail.com] 
Sent: Wednesday, January 3, 2018 9:37 PM
To: Yong Li <yong.b.li at linux.intel.com>
Cc: OpenBMC Maillist <openbmc at lists.ozlabs.org>
Subject: Re: Is there any tool to query dbus interface property?

On Sun, Dec 24, 2017 at 11:31 PM, Yong Li <yong.b.li at linux.intel.com> wrote:
> Hi All,
>
>
>
> I would like to query a dbus property and make different actions based 
> on the property.

Just querying a property can be done via the busctl tool: busctl get-property xyz.openbmc_project.State.BMC
/xyz/openbmc_project/state/bmc0 xyz.openbmc_project.State.BMC CurrentBMCState

> Just like the pgood_wait.c in skeleton, but it only supports the pgood 
> property. Is there any a common tool can support query/wait different 
> dbus interface/objects?

Waiting on a dbus service can be done via the mapper tool: mapper wait
/xyz/openbmc_project/state/bmc0

And this can also all be done in the application code itself using sdbusplus interfaces to mapper and the objects you're interested in.

>
>
> If not, I would like to create one based on the pgood_wait.c
>
>
>
> Thanks,
>
> Yong
>
>



More information about the openbmc mailing list