再起動/終了の原因/原因をどのように知ることができますか?

再起動/終了の原因/原因をどのように知ることができますか?

systemdを実行しているLinuxボックスでシャットダウンまたは再起動コマンドを実行した内容または人を確認する方法はありますか?

ベストアンサー1

.を使用して最後の起動のシステムログを確認しますsudo journalctl -b -1 -e

調査する/var/log/auth.log

これが「停電/スパイク」、「CPU過熱」の1つではないことは確実ですか?

私のシステム(Ubuntu 16.04,6)では

sudo journalctl | grep shutdown
Jan 29 12:58:07 bat sudo[14365]: walt : TTY=pts/0 ; PWD=/home/walt ; USER=root ; COMMAND=/sbin/shutdown now
Feb 12 11:23:59 bat systemd[1]: Stopped Ubuntu core (all-snaps) system shutdown helper setup service.
Feb 19 09:35:18 bat ureadahead[437]: ureadahead:lxqt-session_system-shutdown.png: Ignored relative path
Feb 19 09:35:18 bat ureadahead[437]: ureadahead:gshutdown_gshutdown.png: Ignored relative path
Feb 19 09:35:18 bat ureadahead[437]: ureadahead:mate-gnome-main-menu-applet_system-shutdown.png: Ignored relative path
Feb 27 16:45:40 bat systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Mar 05 17:53:27 bat systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Mar 15 09:57:45 bat systemd[1]: Stopped Ubuntu core (all-snaps) system shutdown helper setup service.
Mar 21 17:40:30 bat systemd[1]: Stopped Ubuntu core (all-snaps) system shutdown helper setup service.
Apr 15 18:16:37 bat systemd[1]: Stopped Ubuntu core (all-snaps) system shutdown helper setup service.
...

最初の行には、waltユーザーが操作を行った時間が表示されますsudo shutdown now

おすすめ記事