Difference between revisions of "Machine-check exception"

From ArchWiki
Jump to: navigation, search
(Configuring mcelog: fixing broken anchor link)
(added info on the mcelog.logrotate file to the 'configuring mcelog' section; added example mcelog.logrotate file from upstream)
Line 16: Line 16:
 
mcelog's configuration file is supposed to be located at {{Filename|/etc/mcelog.conf}}, but as of 2011-09-29, that file is not created after running {{Codeline|pacman -S mcelog}}.  
 
mcelog's configuration file is supposed to be located at {{Filename|/etc/mcelog.conf}}, but as of 2011-09-29, that file is not created after running {{Codeline|pacman -S mcelog}}.  
  
Copy the example {{Filename|mcelog.conf}} file from here: [[#Example /etc/mcelog.conf]].
+
Copy the example {{Filename|mcelog.conf}} file from here: [[#Example /etc/mcelog.conf]]
  
Make sure the file is owned by root:root.
+
Copy the example {{Filename|mcelog.logrotate}} file from here: [[#Example /etc/logrotate.d/mcelog]]
 +
 
 +
Make sure the files are owned by root:root.
 
  chown root:root /etc/mcelog.conf
 
  chown root:root /etc/mcelog.conf
 +
chown root:root /etc/logrotate.d/mcelog # (or /etc/logrotate.d/mcelog.logrotate)
  
 
===Running mcelog as a daemon===
 
===Running mcelog as a daemon===
Line 199: Line 202:
 
# execute triggers in this directory
 
# execute triggers in this directory
 
directory = /etc/mcelog
 
directory = /etc/mcelog
 +
</nowiki>}}
 +
 +
==Example /etc/logrotate.d/mcelog==
 +
As of 2011-09-29, the {{Package Official|mcelog}} package from {{Codeline|[community]}} does not generate a default logrotate file at {{Filename|/etc/logrotate.d/mcelog}} or at {{Filename|/etc/logrotate.d/mcelog.logrotate}}. The example logrotate file from upstream (as of 2011-09-29) can be found below for reference:
 +
 +
{{File
 +
|name=/etc/logrotate.d/mcelog
 +
|content=<nowiki>
 +
/var/log/mcelog {
 +
    compress
 +
    dateext
 +
    maxage 365
 +
    rotate 99
 +
    size=+2048k
 +
    notifempty
 +
    missingok
 +
    copytruncate
 +
    postrotate
 +
    chmod 644 /var/log/mcelog
 +
    [ -r /var/run/mcelog.pid ] && kill -USR1 `cat /var/run/mcelog.pid`
 +
    endscript
 +
}
 
</nowiki>}}
 
</nowiki>}}
  

Revision as of 04:56, 30 September 2011


This article aims to help users implement services to actively monitor, log, and report hardware errors. A machine check exception (MCE) is an error generated by the CPU when the CPU detects that a hardware error or failure has occurred.

Introduction

Machine check exceptions (MCEs) can occur for a variety of reasons ranging from undesired or out-of-spec voltages from the power supply, from cosmic radiation flipping bits in memory DIMMs, or from other miscellaneous faults, including faulty software triggering hardware errors.

Installing mcelog

The mcelog daemon written by Andi Kleen is one of the methods in which one can handle MCEs. The Template:Package Official daemon can be found in the Template:Codeline repository and can be installed with pacman.

pacman -S mcelog

Configuring mcelog

mcelog's configuration file is supposed to be located at Template:Filename, but as of 2011-09-29, that file is not created after running Template:Codeline.

Copy the example Template:Filename file from here: #Example /etc/mcelog.conf

Copy the example Template:Filename file from here: #Example /etc/logrotate.d/mcelog

Make sure the files are owned by root:root.

chown root:root /etc/mcelog.conf
chown root:root /etc/logrotate.d/mcelog # (or /etc/logrotate.d/mcelog.logrotate)

Running mcelog as a daemon

It is recommended by upstream to always run mcelog as a daemon, so edit Template:Filename and set Template:Codeline.

Finally, Template:Codeline needs to be added to the Template:Codeline array in Template:Filename.

Additional configuration options

The following options are probably recommended:

syslog = yes
syslog-error = yes
socket-path = /var/run/mcelog-client

Example /etc/mcelog.conf

As of 2011-09-29, the Template:Package Official package from Template:Codeline does not generate a default/example configuration file at Template:Filename. The example configuration file from upstream (as of 2011-09-29) can be found below for reference:

Template:File

Example /etc/logrotate.d/mcelog

As of 2011-09-29, the Template:Package Official package from Template:Codeline does not generate a default logrotate file at Template:Filename or at Template:Filename. The example logrotate file from upstream (as of 2011-09-29) can be found below for reference:

Template:File

Hardware documentation from CPU manufacturers

See Also