mcelog.triggers(5)
β¨ mcelog.triggers β the trigger scripts reference (section 5, File Formats Manual bestie) β¨
okay so. you found the mcelog.triggers(5) page and honestly? iconic of you. this is the file formats manual, section 5, and it's all about the little scripts that fire off when your memory is going through it. let's get into it π
πΈ NAME πΈ
mcelog.triggers β the mcelog trigger scripts reference, aka the group chat where your errors report in
π¦ SYNOPSIS π¦
here's the whole squad, living rent-free in /etc/mcelog:
/etc/mcelog/bus-error-trigger
/etc/mcelog/cache-error-trigger
/etc/mcelog/dimm-error-trigger
/etc/mcelog/iomca-error-trigger
/etc/mcelog/page-error-trigger
/etc/mcelog/socket-memory-error-trigger
/etc/mcelog/unknown-error-trigger
π DESCRIPTION π
so mcelog(8) keeps track of error thresholds using a leaky-bucket algorithm β yes bestie, a bucket, with a leak, it's giving plumbing but make it math πͺ£β¨ When the number of errors inside a specific time window goes over a pre-configured threshold, a trigger gets executed. Triggers are usually shell scripts chilling in the /etc/mcelog directory, but they can also be other internal actions. Thresholds and triggers get configured in mcelog.conf(5).
The trigger runs as whatever user you configured for mcelog in mcelog.conf, and by default that's root π. You can override the default trigger action by specifying a different trigger script in the configuration file. Wanna do extra stuff on top of the default trigger (like, oh I don't know, notifying an admin)? Drop it into the respective /etc/mcelog/*.local script, which runs after the default action. That way you can update the default scripts without steamrolling your local actions. Also β all trigger actions get logged to syslog. every single one. no secrets here π₯
π§ The DIMM and socket memory error triggers π§
The /etc/mcelog/dimm-error-trigger and /etc/mcelog/socket-memory-error-trigger scripts get executed when a DIMM or a CPU socket exceeds a configured corrected or uncorrected memory error threshold. Those thresholds live in the mcelog.conf [dimm] and [socket] sections. The default triggers just log a warning message in the system log. Important: these triggers are only executed when mcelog runs as a daemon.
Arguments are passed as environment variables:
THRESHOLDβ human readable threshold statusMESSAGEβ Human readable consolidated error messageTOTALCOUNTβ total corrected or uncorrected count of errors for current DIMM, depending on what triggered the eventLOCATIONβ Consolidated location as a single stringDMI_LOCATIONβ DIMM location from DMI/SMBIOS if availableDMI_NAMEβ DIMM identifier from DMI/SMBIOS if availableDIMMβ DIMM number reported by hardwareCHANNELβ Channel number reported by hardwareSOCKETIDβ Socket ID of CPU that includes the memory controller with the DIMMCECOUNTβ Total corrected error count for DIMMUCCOUNTβ Total uncorrected error count for DIMMLASTEVENTβ Time stamp of event that triggered threshold (intime_tformat, seconds)THRESHOLD_COUNTβ Total umber of events in current threshold time period of specific type
After the default action, local actions in /etc/mcelog/dimm-error-trigger.local or the respective /etc/mcelog/socket-memory-error-trigger.local are executed.
π The page error trigger π
The /etc/mcelog/page-error-trigger script is executed by mcelog in daemon mode when a page in memory exceeds a pre-configured corrected or uncorrected error threshold. mcelog internally also implements offlining the page through the kernel. This is configured through the [page] section of mcelog.conf(5).
The environment arguments are the same as for the dimm-error-trigger script.
After the default action, local actions in /etc/mcelog/page-error-trigger.loccal are executed.
π The cache error trigger π
The /etc/mcelog/cache-error-trigger shell script is called for cache error handling in daemon mode when a CPU reports excessive corrected cache errors. This could be a indication for future uncorrected errors π
This trigger is configured through the [cache] section in the mcelog.conf(5) configuration file. The threshold is defined by the CPU. The default trigger offlines the affected CPU cores, unless it is the last core running.
Arguments are passed as environment variables:
MESSAGEβ Human readable error messageCPUβ Linux CPU number that triggered the errorLEVELβ Cache level affected by errorTYPEβ Cache type affected by error (Data,Instruction,Generic)AFFECTED_CPUSβ List of CPUs sharing the affected cacheSOCKETIDβ Socket ID of affected CPU
After the default action, local actions in /etc/mcelog/cache-error-trigger.local are executed.
π The bus-uc-threshold-trigger π
The bus-uc-threshold-trigger runs on uncorrected errors on a IO bus. It is configured through the bus-uc-threshold-trigger and bus-uc-threshold-trigger-threshold options in /etc/mcelog.conf(5). By default it logs a message with the error location to the system log. After the default action, local actions in /etc/mcelog/bus-uc-error-trigger.local are executed.
Arguments are passed as environment variables:
MESSAGEβ Human readable consolidated error message.LOCATIONβ Consolidated location as a single stringSOCKETIDβ Socket ID of CPU that includes the memory controller with the DIMMLEVELβ Interconnect levelPARTICIPATIONβ Processor Participation (Originator,ResponderorObserver)REQUESTβ Request type (read, write, prefetch, etc.)ORIGINβ Memory or IOTIMEOUTβ The request timed out or not
π The iomca-error-trigger π
The iomca-error-trigger runs when a socket receives bus or interconnect errors. It is configured through the iomca-error-trigger and iomca-error-trigger-threshold options in /etc/mcelog.conf. By default it logs a message with the error location to the system log. After the default action, local actions in /etc/mcelog/iomca-error-trigger.local are executed.
Arguments are passed as environment variables:
MESSAGEβ Human readable consolidated error messageLOCATIONβ Consolidated location as a single stringSOCKETIDβ Socket ID of CPU that includes the memory controller with the DIMMCPUβ Linux CPU number that triggered the errorSETβ PCI segment numberBUSβ PCI bus numberDEVICEβ PCI device numberFUNCTIONβ PCI function number
β The unknown-error-trigger β
The unknown-error-trigger runs on any errors not otherwise categorized. It is configured through the unknown-error-trigger and unknown-error-trigger-threshold options in /etc/mcelog.conf. By default it logs a message to the system log. After the default action, local actions in /etc/mcelog/unknown-error-trigger.local are executed.
Arguments are passed as environment variables:
MESSAGEβ Human readable consolidated error messageLOCATIONβ Consolidated location as a single stringSOCKETIDβ Socket ID of CPU that includes the memory controller with the DIMMCPUβ Linux CPU number that triggered the errorSTATUSβIA32_MCi_STATUSregister valueADDRβIA32_MCi_ADDRregister valueMISCβIA32_MCi_MISCregister valueMCGSTATUSβIA32_MCG_STATUSregister valueMCGCAPβIA32_MCG_CAPregister value
π SEE ALSO π
and that's the whole page, bestie π«Ά this came straight out of the mcelog manual β section 5, mcelog.triggers(5) β so if you see it floating around anywhere, that's where it lives. go forth and configure your triggers responsibly πβ¨π
π¦ where this page comes from
- centos-stream 10: mcelog 3:210-1.el10 Β· GPL-2.0-only
- centos-stream 9: mcelog 3:210-1.el9 Β· GPLv2
- fedora 43: mcelog 3:175-13.fc43 Β· GPL-2.0-only
- fedora 44: mcelog 3:175-14.fc44 Β· GPL-2.0-only
- nixos 26.05: mcelog 210
- nixpkgs unstable: mcelog 213
- opensuse-leap 16.0: mcelog 204-160000.2.2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms