In this brief post, I will show you how to quickly check for kernel errors on Centos 7.
Simply type the following command:
egrep -i "kernel:.*(error|crit|fatal)" /var/log/messages*
If you have any logged errors you may receive an output similar to this one.
/var/log/messages:Mar 5 22:32:04 web1 kernel: ERST: Error Record Serialization Table (ERST) support is initialized.
To get a list of all errors you could do something like this:
journalctl -p err -b
-- Logs begin at Wed 2019-03-13 11:49:52 CDT, end at Thu 2019-03-14 14:01:01 CDT. --
Mar 13 11:49:52 myserver.com kernel: pstore: Unknown compression: deflate
Mar 13 16:50:07 myserver.com rsyslogd[7304]: imjournal: loaded invalid cursor, seeking to the head of journal [v8.24.0-34.el7 try http://www.rsyslog.com/e/2027 ]
To get a more detailed list you could use this:
journalctl -p err -b -o verbose
-- Logs begin at Wed 2019-03-13 11:49:52 CDT, end at Thu 2019-03-14 14:01:01 CDT. --
Wed 2019-03-13 11:49:52.638538 CDT [s=8436cb9fc7cb26843cef54a3c47a6439;i=342;b=07ac1996345799765a0ad456851d1b26d;m=223207;t=583fc983c4a4a;x=a5dabdfe2c207324]
_BOOT_ID=07ac1996345799765a0ad456851d1b26d
_MACHINE_ID=286552bef1ea4d07b439c8b97kgde7c8
_HOSTNAME=myserver.com
_TRANSPORT=kernel
SYSLOG_FACILITY=0
SYSLOG_IDENTIFIER=kernel
_SOURCE_MONOTONIC_TIMESTAMP=2094319
PRIORITY=3
MESSAGE=pstore: Unknown compression: deflate
Wed 2019-03-13 16:50:07.347534 CDT [s=8436cb9fc7cb26843cef54a3c47a6439;i=647;b=07ac1996345799765a0ad456851d1b26d;m=102a431;t=58400c9fef074;x=78bea23cbad0def8]
_UID=0
_GID=0
_SYSTEMD_SLICE=system.slice
_BOOT_ID=07ac1996345799765a0ad456851d1b26d
_MACHINE_ID=286552bef1ea4d07b439c8b97kgde7c8
_HOSTNAME=myserver.com
PRIORITY=3
_CAP_EFFECTIVE=3fffffffff
_SELINUX_CONTEXT=system_u:system_r:syslogd_t:s0
SYSLOG_FACILITY=5
_TRANSPORT=syslog
SYSLOG_IDENTIFIER=rsyslogd
_PID=7304
_COMM=rsyslogd
_EXE=/usr/sbin/rsyslogd
_CMDLINE=/usr/sbin/rsyslogd -n
_SYSTEMD_CGROUP=/system.slice/rsyslog.service
_SYSTEMD_UNIT=rsyslog.service
MESSAGE=imjournal: loaded invalid cursor, seeking to the head of journal [v8.24.0-34.el7 try http://www.rsyslog.com/e/2027 ]
_SOURCE_REALTIME_TIMESTAMP=1552513807347534