手动启动mcelog方法:
# mcelog --daemon
Run mcelog in daemon mode, waiting for errors from the kernel.
后台服务启动mcelog:
RHEL 7:
systemctl start mcelog
systemctl enable mcelog
RHEL 6:
service mcelogd start
chkconfig mcelogd on
查看mcelog日志:
# vim /var/log/mcelog
查看mcelog守护进程是否检测到错误信息:
# mcelog --client
Query a currently running mcelog daemon for errors
解析系统异常时的mce输出:
# mcelog --ascii < file.log
or:
# mcelog --ascii --file file.log
Decode machine check ASCII output from kernel logs
异常输出内容示例如下:
[Hardware Error]: CPU 12: Machine Check Exception: 5 Bank 22: be200000000c110a[Hardware Error]: RIP !INEXACT! 10:<ffffffff81014527> {mwait_idle+0x77/0xd0}
[Hardware Error]: TSC 103e7072fa77de ADDR c5f17ee00 MISC b0fe435602184086
[Hardware Error]: PROCESSOR 0:306e4 TIME 1462390781 SOCKET 0 APIC 1
[Hardware Error]: Run the above through ‘mcelog --ascii‘
file.log内容要去掉前面的“[Hardware Error]: ”:
CPU 12: Machine Check Exception: 5 Bank 22: be200000000c110aRIP !INEXACT! 10:<ffffffff81014527> {mwait_idle+0x77/0xd0}
TSC 103e7072fa77de ADDR c5f17ee00 MISC b0fe435602184086
PROCESSOR 0:306e4 TIME 1462390781 SOCKET 0 APIC 1