[systemd-devel] ActiveState property with value "inactive"is not being sent out when service is killed by signal

Pradeepa Kumar cdpradeepa at gmail.com
Wed Jul 27 03:31:28 UTC 2016


I am writing service monitoring app, which needs to know when the services
go from active to inactive/failed.
I am subscribing to PropertiesChanged signal and watching ActiveState.
but this is not sufficient. When a service is stopped using kill/systemctl
stop , i see that i get ActiveState=deactivating  changed signal  twice
:one with  Substate="stop-sigterm" and another with Substate="stop-post".
As per my previous queries, I understand that only ActiveState is
considered an API and we should not be looking into SubState. but I dont
get ActiveState=inactive when a service is stopped.
So this seems to be a bug.
For workaround, is there any way to figure out when an service is stopped
?  As workaround, should i watch SubState ?
Thanks




On Tue, Jul 26, 2016 at 2:54 PM, Pradeepa Kumar <cdpradeepa at gmail.com>
wrote:

> Hi
> ActiveState property with value "inactive"is not being sent out when
> service is killed by signal
> I am using 219 version.
> I logged issue https://github.com/systemd/systemd/issues/3807
> Thanks
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160727/827094f3/attachment.html>


More information about the systemd-devel mailing list