MCELOG(8) Linux's Administrator's Manual MCELOG(8)NAMEmcelog - Print machine check log from x86-64 kernel.
SYNOPSISmcelog [options] [device]
mcelog [options] --ascii
mcelog--version
DESCRIPTION
Linux x86-64 kernels since 2.6.4 don't print recoverable machine check
errors to the kernel log anymore. Instead they are saved into a special
kernel buffer accessible using /dev/mcelog. mcelog reads /dev/mcelog
and prints the stored machine check records to stdout. Then the stored
machine check records in the kernel buffer are deleted.
Mcelog normally runs as a regular cron job to log kernel machine check
events to disk. On newer kernels it can also be triggered directly
using the /sys/devices/system/machinecheck/machinecheck0/trigger trig‐
ger. In addition mcelog can be used on the command line to decode an
existing machine check record in ascii format with the --ascii option.
This is typically used to decode the panic console output of a fatal
machine check, if mcelog was unable to log the data after a warm
reboot.
When the --syslog option is specified redirect output to system log.
The --syslog-error option causes the normal machine checks to be logged
as LOG_ERR (implies --syslog ). Normally only fatal errors or high
level remarks are logged with error level. Some one line summies of
errors are also always logged to the syslog by default unless mcelog
operates in --ascii mode.
When the --logfile=file option is specified append log output to the
specified file. With the --no-syslog option mcelog will never log any‐
thing to the syslog.
When the --cpu=cputype option is specified set the to be decoded CPU to
cputype. See mcelog--help for a list of valid CPUs. Note that speci‐
fying an incorrect CPU can lead to incorrect decoding output. Default
is either the CPU of the machine that reported the machine check (needs
a newer kernel version) or the CPU of the machine mcelog is running on,
so normally this option doesn't have to be used. Older versions of
mcelog had separate options for different CPU types. These are still
implemented, but deprecated and undocumented now.
With the --dmi option mcelog will look up the addresses reported in
machine checks in the SMBIOS/DMI tables of the BIOS. This can some‐
times tell you which DIMM or memory controller has developed a problem.
More often the information reported by the BIOS is either subtly or
obviously wrong or useless. This option requires that mcelog has read
access to /dev/mem (normally requires root) and runs on the same
machine in the same hardware configuration as when the machine check
event happened.
When --ignorenodev is specified then mcelog will exit silently when the
device cannot be opened. This is useful in virtualized environment with
limited devices.
When --filter is specified mcelog will filter out known broken machine
check events (default on). When the --no-filter option is specified
mcelog does not filter events.
When --raw is specified mcelog will not decode, but just dump the
mcelog in a raw hex format. This can be useful for automatic post pro‐
cessing.
When a device is specified the machine check logs are read from device
instead of the default /dev/mcelog.
With the --ascii option mcelog decodes a fatal machine check panic gen‐
erated by the kernel ("CPU n: Machine Check Exception ...") in ASCII
from standard input and exits afterwards. Note that when the panic
comes from a different machine than where mcelog is running on you
might need to specify the correct cputype on older kernels. On newer
kernels which output the PROCESSOR field this is not needed anymore.
When the --file filename option is specified mcelog--ascii will read
the ASCII machine check record from input file filename instead of
standard input.
With the --config-file file option mcelog reads the specified config
file. Default is /etc/mcelog.conf See also CONFIG FILE below.
With the --daemon option mcelog will run in the background and continu‐
ously poll for machine checks for the kernel. This gives the fastest
reaction time, but the normal recommended operating mode is running as
a cronjob or from the kernel trigger (through /sys/devices/sys‐
tem/machinecheck/machinecheck0/trigger). This option implies --syslog.
With the --cpumhz=mhz option assume the CPU has mhz frequency for
decoding the time of the event using the CPU time stamp counter. This
also forces decoding. Note this can be unreliable. on some systems
with CPU frequency scaling or deep C states, where the CPU time stamp
counter does not increase linearly. By default the frequency of the
current CPU is used when mcelog determines it is safe to use. Newer
kernels report the time directly in the event and don't need this any‐
more.
--version displays the version of mcelog and exits.
CONFIG FILEmcelog supports a config file to set defaults. Command line options
override the config file. By default the config file is read from
/etc/mcelog.conf unless overriden with the --config-file option.
The general format is optionname = value White space is not allowed in
value currently, except at the end where it is dropped Comments start
with #.
All command line options that are not commands can be specified in the
config file. For example t to enable the --no-syslog option use no-
syslog = yes (or no to disable). When the option has a argument use
logfile = /tmp/logfile
NOTES
The kernel prefers old messages over new. If the log buffer overflows
only old ones will be kept.
The exact output depends on the CPU.
SMBIOS/DMI output is unreliable and sometimes wrong. Not Linux's fault
- complain to your motherboard vendor. mcelog does some sanity checks
to distingush bad BIOS from good BIOS but it is not 100% fool proof.
mcelog will report serious errors to the syslog during decoding.
FILES
/dev/mcelog (char 10, minor 227)
/etc/mcelog.conf
/var/lib/memory-errors
Memory error database
SEE ALSO
AMD x86-64 architecture programmer's manual, Volume 2, System program‐
ming
IA32 Intel Architecture Software developer's manual, Volume 3, System
programming guide
Datasheet of your CPU.
SuSE Labs May 2009 MCELOG(8)