ubus running key status

Ravi Paluri rpaluri at qti.qualcomm.com
Thu Feb 29 02:45:58 PST 2024

Thanks, Paul for the reply.
Can you help us with a sample usage of "ubus subscribe" OR "ubus listen" OR "ubus monitor", which helps us to learn, "running" flag change to false from true.

We are polling the status of "running" flag as below.
ubus call service list '{"name":"test*.init","verbose":"True"}' | grep -i \"running\"

This is working when script execution takes some time.
For some scripts that take very less time (for e.g, a single instruction such as "uci set .."), we are not able to detect the transition of "running" flag to false from true as the flag changes it's value quickly.

-----Original Message-----
From: openwrt-devel <openwrt-devel-bounces at lists.openwrt.org> On Behalf Of Paul D
Sent: Friday, February 23, 2024 7:35 PM
To: openwrt-devel at lists.openwrt.org
Subject: Re: ubus running key status

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

On 2024-02-23 13:43, Ravi Paluri (QUIC) wrote:
> Can you let us know, is there a way to get a notification when the "running" key value moves to "false" from "true"?
> OR is there any ubus API to which we can register a callback, which will then be invoked when the execution is complete?

Not certain about callbacks - but there is "ubus monitor" "ubus subscribe" "ubus listen" and "ubus wait_for"

They're blocking calls, at least.

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list