Currently it appears that systemd does not provide a way to put max time
limit for system reboot.
So there is no way to get system reboot within specified time limit even if
hardware watchdog is present in system.
Using RunTimeWatchDogSec,ShutDownTimeWatchDogSec and
JobTimeoutSec,JobTimeoutAction= in shutdown.target will not solve this
RunTimeWatchDogSec configures hardware watchdog (hw wd )with the given
timeout value and system manager will pat the wd at least once in half of
This wd patting will be done in 1st phase of shutdown also.
example: set this to 2 min and hw wd gets configured with 2 min timeout and
system manager keeps patting every 1min.
ShutDownTimeWatchDogSec will configured HW WD with given value and pats the
WD during 2nd phase of shutdown.
2nd phase of shutdown contains loop of 'try to clean up remaining things'.
So for ex, if we set ShutDownTimeWatchDogSec to 10 min, then during 2nd
phase of shutdown , if any task of 'try to clean up remaining things' in
the loop takes more than 10 min, then only HW WD get fired and system
So this puts max time out on each iteration of loop and not on entire loop
So this setting does not help in putting max time out for 2nd phase of
But intention of ShutDownTimeWatchDogSec from man page is : “It works as a
safety net to ensure that the reboot takes place even if a clean reboot
attempt times out.”
Clearly this intention is not served by current implementation of
Do we need to :
redefine ShutDownTimeWatchDogSec and use it to put max time out on entire
2nd part of shutdown.
i.e set the user given value of ShutDownTimeWatchDogSec to HW WD at
beginning of 2nd phase of shutdown but do not pat HW WD each time in in
each iteration of loop.
this way, if 2nd phase takes more than 10 min, then hw wd gets fired and
please let me know if we need to open a bug for this
1) related write up
2) my previous queries related to this are
systemd-devel mailing list