This depends on your server hardware. A whitebox or a Supermicro system will handle this differently than a Dell, HP or IBM...
One of the value-add features of high-end servers is that there's a level of hardware/OS integration. Nicer servers will report what you're looking for as part of the management agents and/or out-of-band management solution (ILO, DRAC, IPMI).
You should use the tools native to your hardware platform.
Excerpt from an HP ProLiant servers running Linux and the HP Management agents:
ECC Memory Correctable Errors detected.
Advanced ECC Memory Engaged
or a more severe
A correctable memory log entry indicates a memory module needs to be
or the worst... Ignoring an error for 6 days until the server crashes because of bad RAM
0004 Repaired 22:21 12/01/2008 22:21 12/01/2008 0001
LOG: Corrected Memory Error threshold exceeded (Slot 1, Memory Module 1)
0007 Repaired 02:58 12/07/2008 02:58 12/07/2008 0001
LOG: POST Error: 201-Memory Error Single-bit error occured during
Board 1, DIMM 1. Bank containing DIMM(s) has been disabled.
0008 Repaired 19:31 12/08/2009 19:31 12/08/2009 0001
LOG: ASR Detected by System ROM
These were logged, plus SNMP traps and emails were sent.
Generically, you'll see Machine Check Exceptions in the kernel ring buffer, so you can check
dmesg or run mcelog. In my experiences with Supermicro gear without IPMI, that didn't catch everything, and I still had RAM errors slip through the cracks and cause outages. Unfortunately, this led to archaic RAM burn-in policies before system deployments.