<div dir="ltr">Thanks for the information.<div><br></div><div>Is there any service in the existing standard distribution, where I can get hands on these parameters <span style="font-family:arial,sans-serif;font-size:13px">ExecStartPre, ExecStart, ExecStartPost,</span></div>
<span style="font-family:arial,sans-serif;font-size:13px">ExecReload, ExecStop, ExecStop, ExecMainCode, signal result and ExecMainStatus under </span><span style="font-family:arial,sans-serif;font-size:13px">"Service Unit Objects".?</span><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Unfortunately not all the services implements these parameters, I searched many but could not find. </span><span style="font-family:arial,sans-serif;font-size:13px">I am currently using fedora 19 and want to get hands on these things to have better understanding.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks in advance.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Regards</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Abhishek</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Sep 27, 2013 at 12:16 AM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, 26.09.13 18:28, abhishek sharma (<a href="mailto:abhishek.sharma81@gmail.com">abhishek.sharma81@gmail.com</a>) wrote:<br>
<br>
> Hi All,<br>
><br>
> I am new to Systemd, Need help about understanding some of features of the<br>
> systemd.<br>
> I am interested in knowing the failure of a service and the exact cause of<br>
> it.<br>
><br>
> Inside the systemd unit file there are options like SuccessExitStatus and<br>
> On-failure. In SuccessExitStatus we can specify the signals which when<br>
> received will be considered as the the successful exit. my question is<br>
><br>
> 1. Any other signal than the ones mentioned in SuccessExitStatus would be<br>
> considered as the failure(on-failure)?<br>
<br>
</div>Nope. SIGINT, SIGTERM, SIGHUP, SIGPIPE are never considerd failures, as<br>
they generally indicate clean or user triggered termination.<br>
<div class="im"><br>
> 2. How can we get the exact signal from on-failure?<br>
<br>
</div>Use the bus API, it's all exported.<br>
<br>
<a href="http://www.freedesktop.org/wiki/Software/systemd/dbus/" target="_blank">http://www.freedesktop.org/wiki/Software/systemd/dbus/</a><br>
<br>
See the documentation for ExecStartPre, ExecStart, ExecStartPost,<br>
ExecReload, ExecStop, ExecStop, ExecMainCode and ExecMainStatus under<br>
"Service Unit Objects".<br>
<div class="im"><br>
> 2. Rather than Restart = on-failure, can we use something like<br>
> on-failure = xyz.service<br>
<br>
</div>There's OnFailure= for this. See systemd.unit(5).<br>
<div class="im"><br>
> 3. Is there any Dbus interface exposed by systemd which can be used to get<br>
> the information like service with unusual exit and the corresponding<br>
> signal?<br>
<br>
</div>Yes, (see above).<br>
<span class="HOEnZb"><font color="#888888"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering - Red Hat, Inc.<br>
</font></span></blockquote></div><br></div>