Shutdown initiated by poweroff command vs. power button

General support questions
Post Reply
r51
Posts: 1
Joined: 2020/09/07 13:11:44

Shutdown initiated by poweroff command vs. power button

Post by r51 » 2020/09/07 15:26:55

Hello,

I have installed CentOS 7.8.2003 Minimal. CentOS is running under bhyve hypervisor. After entering 'poweroff' command via SSH to CentOS, the /var/log/messages includes:

systemd: Created slice User Slice of root.
systemd: Started Session 24 of user root.
systemd: Closed LVM2 poll daemon socket.
systemd: Stopping Session 24 of user root.
systemd: Stopped Dump dmesg to /var/log/dmesg.
systemd: Stopping LVM2 PV scan on device 8:3...
systemd: Removed slice system-selinux\x2dpolicy\x2dmigrate\x2dlocal\x2dchanges.slice.
systemd: Stopped target Multi-User System.
systemd: Stopping irqbalance daemon...
systemd: Stopped target Login Prompts.
systemd: Stopping Postfix Mail Transport Agent...
systemd: Stopping OpenSSH server daemon...
chronyd[740]: chronyd exiting
systemd: Stopping NTP client/server...
systemd: Stopping System Logging Service...
systemd: Stopping Getty on tty1...
systemd: Stopping Dynamic System Tuning Daemon...
systemd: Stopped target Timers.


If VM shutdown is initiated by power button it includes:

systemd-logind: Power key pressed.
systemd-logind: Powering Off...
systemd-logind: System is powering down.
systemd: Stopped target Multi-User System.
chronyd[733]: chronyd exiting
systemd: Stopping NTP client/server...
systemd: Stopped target Login Prompts.
systemd: Stopping Command Scheduler...
systemd: Stopping Postfix Mail Transport Agent...
systemd: Stopping Getty on tty1...
systemd: Stopping irqbalance daemon...


Some lines with 'Stopping ...' are missing. E.g. 'Stopping OpenSSH server daemon...', so the established SSH connection is not stopped properly, server does not close the open connection (result is same as someone cut the ethernet cable).

Is the shutdown of CentOS initiated by power button the safe approach (properly stop all running services)? Why the process is different to shutdown initiated by 'poweroff' command?

Thank you.

Post Reply

Return to “CentOS 7 - General Support”