Is there any tool to query dbus interface property?
Hi All,
I would like to query a dbus property and make different actions based on the property.
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?
If not, I would like to create one based on the pgood_wait.c
Thanks,
Yong
Quoted 6 lines · Yong Li
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
Quoted 3 lines
Just like the
pgood_wait.cin 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.
Quoted 11 lines
If not, I would like to create one based on the
pgood_wait.cThanks,
Yong
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:[email protected]]
Sent: Wednesday, January 3, 2018 9:37 PM
To: Yong Li <[email protected]>
Cc: OpenBMC Maillist <[email protected]>
Subject: Re: Is there any tool to query dbus interface property?
Quoted 6 lines · Yong Li
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
Quoted 3 lines
Just like the
pgood_wait.cin 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.
Quoted 11 lines
If not, I would like to create one based on the
pgood_wait.cThanks,
Yong
Quoted 6 lines · Yong Li
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......
May want to take a look at
https://github.com/openbmc/witherspoon-pfault-analysis/blob/master/power-sequencer/pgood_monitor.cpp#L112
That sets up a dbus watch on the pgood property changing and calls a callback function when it happens. Sounds more like what you want.
Quoted 43 lines
Thanks,
Yong-----Original Message-----
From: Andrew Geissler [mailto:[email protected]]
Sent: Wednesday, January 3, 2018 9:37 PM
To: Yong Li <[email protected]>
Cc: OpenBMC Maillist <[email protected]>
Subject: Re: Is there any tool to query dbus interface property?Quoted 6 lines · Yong Li
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
Quoted 3 lines
Just like the
pgood_wait.cin 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.
Quoted 11 lines
If not, I would like to create one based on the
pgood_wait.cThanks,
Yong