[systemd-devel] drop-ins and watchdogs question

Alison Chaiken alison at she-devel.com
Sat Mar 21 13:07:57 PDT 2015


Typing

                 modprobe softdog soft_noboot=0
                 watchdog-test -e

turns on the kernel's softdog timer.    'sudo lsof /dev/watchdog'
shows no readers, as expected, and system will reboot.   With a
system.conf file in /run/systemd/system.conf.d that contains the singe
uncommented line

                 RuntimeWatchdogSec=60

then typing

                systemctl daemon-reexec
                lsof /dev/watchdog

shows that systemd is holding the file open, and the system does not
reboot: perfect.

To stop systemd from petting the dog, I create a new system.conf file that has

                 RuntimeWatchdogSec=0

and type 'systemctl daemon-reexec'.   As expected, 'sudo lsof
/dev/watchdog' shows no one is holding file open.   However, the
system does not reboot!    I'm not sure if this is because of the way
that the softdog works, or because I haven't overridden the property
properly.    I can see that if I just removed the
/run/systemd/system.conf file, that RuntimeWatchdogSec should be
unchanged upon daemon-reexec, but I would think that manually
overriding it by setting it to zero should have the intended result
here.   Which leads to the questions:

-- Is there a way to get systemd to dump what values it's using for
the variables in system.conf?   'systemctl show-environment' doesn't
do it.

-- In a realistic situation, how would drop-in configuration files in
/run/systemd be created?   I guess a script in the initrd could do it.
   Presumably configuration of a feature like a watchdog that is
needed early in boot is better handled through
/etc/systemd/system.conf.

Thanks,
Alison

-- 
Alison Chaiken                           alison at she-devel.com
650-279-5600
http://{she-devel.com,exerciseforthereader.org}
One consumes a great deal of silence in the course of becoming
educated. -- Matthew B. Crawford


More information about the systemd-devel mailing list