My server unexpectedly powered down today. From syslog, it seems like it might have been the unattended upgrade service:
Nov 22 15:23:25 lynx systemd[1]: unattended-upgrades.service: Succeeded.
Nov 22 15:23:25 lynx systemd[1]: Removed slice system-modprobe.slice.
Nov 22 15:23:25 lynx systemd[1]: Stopped target Graphical Interface.
Nov 22 15:23:25 lynx systemd[1]: Stopped target Multi-User System.
Nov 22 15:23:25 lynx systemd[1]: Stopped target Login Prompts.
Nov 22 15:23:25 lynx systemd[1]: Stopped target Host and Network Name Lookups.
Nov 22 15:23:25 lynx systemd[1]: Stopped target Timers.
...
etc
The omitted parts are a list of various services that systemd is shutting down. If I look at the output of last
:
$ last -x | head | tac
...
shutdown system down 5.4.0-90-generic Mon Nov 22 15:23 - 17:14 (01:51)
reboot system boot 5.4.0-90-generic Mon Nov 22 17:14 still running
runlevel (to lvl 5) 5.4.0-90-generic Mon Nov 22 17:15 still running
I can see that the shutdown was properly logged to the system, and then you can see 2 hours later when I noticed the machine was down and rebooted it. My question is two fold - Why did this happen, and how do I configure this? I've been running this machine for years and I don't think I can recall it ever shutting down for an update before. The logs make me think it was unattended upgrade that did this, but I'm not sure how to verify that. If I understood how to configure unattended upgrade's settings/options I might notice something that controls it rebooting or shutting down, which is why I want to know how to do that. I'd prefer to either disable this (no shutdown) or change it to reboot (if the machine is on, I want it to stay on!). Any suggestions?
0 Answers