<div dir="ltr"><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22.4px;margin-top:0px!important">Hi systemd-experts,</p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">I am writing a daemon which starts, stops and monitor services and
I am using dbus to interface with systemd. I send messages on dbus to start or
stop the service and this is working well. I want to achieve the following:</span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"> </span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">1) Monitor service exit using the systemd dbus interface.</span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">2) Monitor when the service has entered a failed state </span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"> </span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">I am trying to understand what is the right mechanism to implement
this using the systemd dbus interface, I have tried a few things clearly I
don’t understand how this works, any help greatly appreciated.</span><span style="color:black"></span></p><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22.4px;margin-top:0px!important">











</p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"> </span><span style="color:black"></span></p><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22.4px;margin-top:0px!important"><span style="line-height:22.4px">I am looking for way to know when service stopped or failed so that i can take some action in my monitoring app.</span><br></p><p style="margin-top:0px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22.4px;margin-bottom:0px!important">I am listening to PropertiesChanged signal and query ActiveState property to get new value. This does not work always.<br>Some times, unit is unloaded before I query the ActiveState.<br>Do we get new values of property along with PropertiesChanged signal in new version of systemd?<br>if yes in which version this feature was added ?<br>What is the best way to achieve my requirement ?</p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">Appreciate your help on above queries</span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"> </span><span style="color:black"></span></p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">Thanks</span><span style="color:black"></span></p><p style="margin-top:0px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22.4px;margin-bottom:0px!important">





</p><p class="MsoNormal"><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black">Prashant</span><span style="color:black"></span></p></div>