CentOS 7 Unexpected Shutdown Logs: How to Check

You can find the log of abnormal shutdown on CentOS 7 by checking the system log files. Below are some commonly used commands to view system log files:

  1. Use the journalctl command to view system log files.
journalctl -xe
  1. Check the kernel log using the dmesg command.
dmesg
  1. Check the /var/log/messages file.
cat /var/log/messages
  1. Check the file ‘/var/log/syslog’.
cat /var/log/syslog

By using the above command, you can view the system’s log files to identify records of unexpected shutdowns or error messages in order to investigate the cause of the unexpected shutdown.

bannerAds