<p dir="ltr">It is the responsibility of whatever sends the watchdog to ensure everything's healthy, however necessary. It would be silly to spawn a thread and have it blindly report health to watchdog. The point is for that thread to do proper checks but ensure reports go in at the right intervals.</p>
<div class="gmail_quote">On Nov 22, 2013 7:50 PM, "Reindl Harald" <<a href="mailto:h.reindl@thelounge.net">h.reindl@thelounge.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Am 22.11.2013 03:04, schrieb salil GK:<br>
> Thanks a lot David<br>
><br>
> On 22 November 2013 06:44, David Timothy Strauss <<a href="mailto:david@davidstrauss.net">david@davidstrauss.net</a> <mailto:<a href="mailto:david@davidstrauss.net">david@davidstrauss.net</a>>> wrote:<br>
><br>
> On Thu, Nov 21, 2013 at 4:57 PM, salil GK <<a href="mailto:gksalil@gmail.com">gksalil@gmail.com</a> <mailto:<a href="mailto:gksalil@gmail.com">gksalil@gmail.com</a>>> wrote:<br>
> > What happens is - my process may be busy with some other activity during<br>
> > which time it will fail to send periodic message to systemd. After a while<br>
> > it will come out of it's loop and ready to serve. But during this time<br>
> > system would have already marked the process as failed.<br>
><br>
> Then you need to either use another thread, refactor to make a tighter<br>
> event loop, or increase the watchdog time. Drifting in and out of<br>
> tolerance with watchdog is not a safe strategy.<br>
<br>
the problem i see with "use another thread" is that this thread can happily<br>
work and send it's keep alive, but that does not mean at the end that the<br>
service itself is working OK and responsible because both are running<br>
isolated<br>
<br>
in case of network services it would be pretty cool if systemd watchdog<br>
could be configured to connect to the service avery n seconds and if<br>
there is no response restart it because this would monitor the real service<br>
without need external tools<br>
<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="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
<br></blockquote></div>