mcelog collects and decodes machine check exceptions: hardware errors reported by the CPU, such as corrected/uncorrected memory errors and cache errors. On supported systems it can also mark failing RAM pages offline so they are no longer used.
sudo mcelog --client # ask the running daemon for its accumulated data
sudo mcelog --ascii < /var/log/mcelog # decode logged raw records (older kernels)
Recent kernels and distributions favour rasdaemon instead, and newer CPUs are only supported there. A steady stream of corrected memory errors from one DIMM is an early warning to replace it. Uncorrected errors mean data corruption or a crash has already happened.