1#!/bin/sh 2# This shell script can be executed by mcelog in daemon mode when a sockets 3# exceeds a pre-configured error threshold for memory errors 4# 5# environment: 6# THRESHOLD human readable threshold status 7# MESSAGE Human readable consolidated error message 8# TOTALCOUNT total count of errors for current socket of CE/UC depending on 9# what triggered the event 10# LOCATION Consolidated location as a single string 11# SOCKETID Socket ID of CPU that includes the memory controller with the DIMM 12# CECOUNT Total corrected error count for socket 13# UCCOUNT Total uncorrected error count for socket 14# LASTEVENT Time stamp of event that triggered threshold (in time_t format, seconds) 15# THRESHOLD_COUNT Total umber of events in current threshold time period of specific type 16# 17# note: will run as mcelog configured user 18# this can be changed in mcelog.conf 19 20logger -s -p daemon.err -t mcelog "$MESSAGE" 21logger -s -p daemon.err -t mcelog "Location: $LOCATION" 22 23[ -x ./socket-memory-error-trigger.local ] && . ./socket-memory-error-trigger.local 24 25exit 0 26