
{"id":16909,"date":"2018-02-11T14:20:03","date_gmt":"2018-02-11T14:20:03","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=16909"},"modified":"2018-02-11T14:20:03","modified_gmt":"2018-02-11T14:20:03","slug":"mce-hardware-error-machine-check-events-logged-appears-in-syslog-what-should-i-do","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2018\/02\/11\/mce-hardware-error-machine-check-events-logged-appears-in-syslog-what-should-i-do\/","title":{"rendered":"\u201cmce: [Hardware Error]: Machine check events logged\u201d appears in syslog."},"content":{"rendered":"<p><u>ABOUT mcelog<\/u><\/p>\n<pre>\nmcelog logs and accounts machine checks (in particular memory, IO, and CPU hardware errors) on modern x86 Linux systems.\nmcelog is required by both 32bit x86 Linux kernels (since 2.6.30) and 64bit Linux kernels (since early 2.6 kernel releases) to log machine checks and should run on all Linux systems that need error handling.\n\nThe mcelog daemon accounts memory and some other errors errors in various ways. mcelog --client can be used to query a running daemon. The daemon can also execute triggers when configurable error thresholds are exceeded. This is used to implement a range of automatic predictive failure analysis algorithms: including bad page offlining and automatic cache error handling. User defined actions can be also configured.\n\nAll errors are logged to \/var\/log\/mcelog or syslog or the journal.\n\nFor memory errors it supports modern x86 systems with integrated memory controllers; for CPU errors all modern x86 systems are supported.\n\nTraditionally mcelog was run as a cronjob, but this usage is deprecated now. The modern way to run it is to start it at boot up time and run it always as a daemon. In addition it can be used to decode fatal machine checks on the command line (but this is also usually not needed anymore on modern kernels which log those after reboot automatically)\n\n\n<\/pre>\n<p><u>SHELL SESSION EXPOSURE<\/u><br \/>\n[bash]<br \/>\n$sudo apt-get install mcelog<br \/>\n[sudo] password for jeffrin:<br \/>\nReading package lists&#8230; Done<br \/>\nBuilding dependency tree<br \/>\nReading state information&#8230; Done<br \/>\nThe following packages were automatically installed and are no longer required:<br \/>\n  bluez-alsa bluez-gstreamer cgmanager cups-client libcgmanager0 libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libnih-dbus1<br \/>\n  libnih1<br \/>\nUse &#8216;sudo apt autoremove&#8217; to remove them.<br \/>\nThe following NEW packages will be installed:<br \/>\n  mcelog<br \/>\n0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.<br \/>\nNeed to get 69.9 kB of archives.<br \/>\nAfter this operation, 213 kB of additional disk space will be used.<br \/>\nGet:1 http:\/\/http.us.debian.org\/debian stable\/main amd64 mcelog amd64 147+dfsg-1 [69.9 kB]<br \/>\nFetched 69.9 kB in 2s (37.8 kB\/s)<br \/>\nSelecting previously unselected package mcelog.<br \/>\n(Reading database &#8230; 246779 files and directories currently installed.)<br \/>\nPreparing to unpack &#8230;\/mcelog_147+dfsg-1_amd64.deb &#8230;<br \/>\nUnpacking mcelog (147+dfsg-1) &#8230;<br \/>\nSetting up mcelog (147+dfsg-1) &#8230;<br \/>\nProcessing triggers for systemd (239-15) &#8230;<br \/>\nProcessing triggers for man-db (2.8.4-3) &#8230;<br \/>\n$<\/p>\n<p>[\/bash]<\/p>\n<p>[bash]<br \/>\n$git clone git:\/\/git.kernel.org\/pub\/scm\/utils\/cpu\/mce\/mcelog.git<br \/>\nCloning into &#8216;mcelog&#8217;&#8230;<br \/>\nremote: Counting objects: 2235, done.<br \/>\nremote: Total 2235 (delta 0), reused 0 (delta 0)<br \/>\nReceiving objects: 100% (2235\/2235), 577.07 KiB | 71.00 KiB\/s, done.<br \/>\nResolving deltas: 100% (1521\/1521), done.<br \/>\n$<\/p>\n<p>[\/bash]<\/p>\n<p><u>SOURCE CODE EXPOSURE<\/u><\/p>\n<p>[c]<br \/>\nstatic char *skipgunk(char *s)<br \/>\n{<br \/>\n\ts = skip_syslog(s);<\/p>\n<p>\ts = skipspace(s);<br \/>\n\tif (*s == &#8216;&lt;&#8216;) {<br \/>\n\t\ts += strcspn(s, &quot;&gt;&quot;);<br \/>\n\t\tif (*s == &#8216;&gt;&#8217;)<br \/>\n\t\t\t++s;<br \/>\n\t}<br \/>\n\ts = skipspace(s);<br \/>\n\tif (*s == &#8216;[&#8216;) {<br \/>\n\t\ts += strcspn(s, &quot;]&quot;);<br \/>\n\t\tif (*s == &#8216;]&#8217;)<br \/>\n\t\t\t++s;<br \/>\n\t}<\/p>\n<p>\ts = skipspace(s);<\/p>\n<p>\tif (strncmp(s, &quot;mce: [Hardware Error]:&quot;, 22) == 0)<br \/>\n\t\ts += 22;<\/p>\n<p>\treturn skipspace(s);<br \/>\n}<br \/>\n[\/c]<\/p>\n<p>SOURCE CODE TAKEN FROM git:\/\/git.kernel.org\/pub\/scm\/utils\/cpu\/mce\/mcelog.git<\/p>\n<p>LINKS.  SOURCE AND OTHER<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Machine-check_exception\">https:\/\/en.wikipedia.org\/wiki\/Machine-check_exception<\/a><br \/>\n<a href=\"http:\/\/www.mcelog.org\/download.html\">http:\/\/www.mcelog.org\/download.html<\/a><br \/>\n<a href=\"https:\/\/www.mcelog.org\/\">https:\/\/www.mcelog.org\/<\/a><br \/>\n<a href=\"https:\/\/github.com\/andikleen\/mcelog\">https:\/\/github.com\/andikleen\/mcelog<\/a><br \/>\n<a href=\"https:\/\/askubuntu.com\/questions\/605369\/mce-hardware-error-machine-check-events-logged-appears-in-syslog-what-sho\">https:\/\/askubuntu.com\/questions\/605369\/mce-hardware-error-machine-check-events-logged-appears-in-syslog-what-sho<\/a><br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Substring\">https:\/\/en.wikipedia.org\/wiki\/Substring<\/a><br \/>\n<a href=\"https:\/\/www.ibm.com\/support\/knowledgecenter\/en\/SSLTBW_2.3.0\/com.ibm.zos.v2r3.ccrug00\/strcspn.htm\">https:\/\/www.ibm.com\/support\/knowledgecenter\/en\/SSLTBW_2.3.0\/com.ibm.zos.v2r3.ccrug00\/strcspn.htm<\/a><br \/>\n<a href=\"https:\/\/www.ibm.com\/support\/knowledgecenter\/SSLTBW_2.3.0\/com.ibm.zos.v2r3.ccrug00\/strncmp.htm#strncmp\">https:\/\/www.ibm.com\/support\/knowledgecenter\/SSLTBW_2.3.0\/com.ibm.zos.v2r3.ccrug00\/strncmp.htm#strncmp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT mcelog mcelog logs and accounts machine checks (in particular memory, IO, and CPU hardware errors) on modern x86 Linux systems. mcelog is required by both 32bit x86 Linux kernels (since 2.6.30) and 64bit Linux kernels (since early 2.6 kernel releases) to log machine checks and should run on all Linux systems that need error &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2018\/02\/11\/mce-hardware-error-machine-check-events-logged-appears-in-syslog-what-should-i-do\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u201cmce: [Hardware Error]: Machine check events logged\u201d appears in syslog.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"link","meta":[],"categories":[54],"tags":[532,1070,1085,1104],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16909"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=16909"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16909\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=16909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=16909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=16909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}