3
I want to figure out if a service is enabled or not.
With the SysV Init was easy. But with systemctl status <service name>
is confusing and systemd is too complex to dig in.
Specifically, I try enabling with
# systemctl enable watchdog.service
but after reboot it's gives me this status:
# systemctl status watchdog.service
● watchdog.service - watchdog daemon
Loaded: loaded (/lib/systemd/system/watchdog.service; static; vendor preset: enabled)
Active: inactive (dead)
But I can't understand id it's enable but something happening, or if the enable service command failed.
At any moment, starting the service manually works fine:
# systemctl start watchdog.service
# systemctl status watchdog.service
● watchdog.service - watchdog daemon
Loaded: loaded (/lib/systemd/system/watchdog.service; static; vendor preset: enabled)
Active: active (running) since Qua 2016-12-21 04:03:26 BRST; 2s ago
Process: 9111 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, sta
Process: 9109 ExecStartPre=/bin/sh -c [ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe
Main PID: 9115 (watchdog)
CGroup: /system.slice/watchdog.service
└─9115 /usr/sbin/watchdog
watchdog[9115]: int=1s realtime=yes sync=no soft=no mla=24 mem=0
watchdog[9115]: ping: no machine to check
watchdog[9115]: file: no file to check
watchdog[9115]: pidfile: no server process to check
systemd[1]: Started watchdog daemon.
watchdog[9115]: interface: no interface to check
watchdog[9115]: temperature: no sensors to check
watchdog[9115]: test=none(0) repair=none(0) alive=/dev/watchdog heartbeat=none to=root no_act=
watchdog[9115]: watchdog now set to 15 seconds
watchdog[9115]: hardware watchdog identity: Broadcom BCM2835 Watchdog timer