<div dir="ltr">sorry for not being clear earlier.<div> may be i am not explaining properly.<div><br><div>In XYZ.service:</div><div>ExecStop: myscript1</div><div><br></div><div>$cat myscript1</div><div>echo "inside myscript1"</div><div><br></div><div><br></div><div>and</div><div><br><div>The sequence in jounrnalctl logs are:</div><div><br></div><div><div> May 18 01:18:06 machine1 systemd[1]: Stopping "XYZ service"...</div></div><div>...</div><div><div> May 18 01:18:46 machine1 myscript1[3941]: inside myscript1</div></div><div><br></div><div>As you can see, the beginning of execution of myscript1 took 40 sec.</div><div><br></div><div><br></div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 8:23 PM, Reindl Harald <span dir="ltr"><<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
Am 18.05.2016 um 16:51 schrieb Pradeepa Kumar:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My understanding is ExecStop will be called before sending SIGTERM to<br>
service.<br>
if it is true then systemd took 42 sec to initiate stop sequence<br>
(calling script in ExecStop) and send SIGTERM to service.<br>
please correct me if I am wrong<br>
</blockquote>
<br></span>
you don't get it<br>
your "ExecStop" took 42 sec<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Wed, May 18, 2016 at 7:58 PM, Reindl Harald <<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a><br></span><span class="">
<mailto:<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a>>> wrote:<br>
<br>
Am 18.05.2016 um 16:23 schrieb Pradeepa Kumar:<br>
<br>
I have a script in ExecStop in service file.<br>
In journalctl, The time difference between "Stopping XYZ service<br>
" and<br>
logs from my script in ExecStop is 42 sec.<br>
Does that mean systemd itself took long time to start stopping of<br>
service?<br>
<br>
<br>
no, it means systemd is only the messenger and your script took 42<br>
seconds to finish<br>
<br>
On Wed, May 18, 2016 at 5:36 PM, Lennart Poettering<br>
<<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a> <mailto:<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>><br></span>
<mailto:<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a> <mailto:<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>>>><span class=""><br>
wrote:<br>
<br>
On Wed, 18.05.16 16:00, Pradeepa Kumar (<a href="mailto:cdpradeepa@gmail.com" target="_blank">cdpradeepa@gmail.com</a><br>
<mailto:<a href="mailto:cdpradeepa@gmail.com" target="_blank">cdpradeepa@gmail.com</a>><br></span>
<mailto:<a href="mailto:cdpradeepa@gmail.com" target="_blank">cdpradeepa@gmail.com</a> <mailto:<a href="mailto:cdpradeepa@gmail.com" target="_blank">cdpradeepa@gmail.com</a>>>)<span class=""><br>
wrote:<br>
<br>
> Hi experts,<br>
> I am using systemd v219.<br>
> I need help with a systemd issue that I am seeing.<br>
> I see that some times stopping of service is taking long<br>
time (42 sec).<br>
> i checked this in journal logs also.<br>
> is this is known issue ?<br>
> how do i debug this ?<br>
> and any solutions ?<br>
<br>
Well, that depends on the specific service. If a specific<br>
service<br>
takes 42s to shut down, then try figuring out what it does.<br>
If there's<br>
nothing in the journal, then maybe the service maintains its<br>
own logs?<br>
If it does not, see if you can turn on debug logging for it.<br>
<br>
Either way, that's really a question to ask the maintainers<br>
of that<br>
service, not to systemd upstream.<br>
</span></blockquote>
<br>
<br>_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
<br></blockquote></div><br></div>