Puget Systems print logo
Read this article at https://www.pugetsystems.com/guides/462
Article Thumbnail

How to Check ECC RAM Functionality

Written on April 3, 2013 by Matt Bach


ECC (error-correcting code) RAM is essential in servers and many workstations as it dramatically improves the reliability of the system's memory by detecting common kinds of data corruption and fixing the errors automatically. Without the error correction of ECC memory, memory errors can cause data corruption or even blue screens.

ECC RAM Functionality

In order for ECC RAM to work correctly, you need three things:

  1. ECC RAM
  2. A CPU that supports ECC RAM
  3. A motherboard that supports ECC RAM

Even if you have all three and ECC should be working, it is often the case that you will want to check to make sure that ECC is functioning as it should. After all, you paid the extra money for ECC RAM so it stands to reason that you would want to make sure it is working properly.

Unfortunately, while this sounds simple it is actually very difficult to do. Many motherboards have a BIOS option to enable or disable ECC, but even then you are only ensured that the BIOS is trying to use ECC and not that it is actually running. In order to do so, there are three methods that we have found to semi-accurately show if ECC is enabled and working. Unfortunately, there are several instances when one or more of these methods do not show ECC as working when it actually is, so even if one of these methods does not detect ECC as working that does not mean that it is not working. All it means is that the program/utility does not detect that ECC is working. If, however, any one of these methods shows ECC as enabled and working, you know that ECC is actually working.

BIOS Information

The easiest way to see if ECC is enabled is to look in the motherboard BIOS. Unfortunately, like all the other methods we will be showing in this article this method is not fool-proof. While many server-class motherboards will have something in the BIOS that shows that ECC is enabled, in our experiance the majority will not.

Even so, this is the easiest method to use and requires no special software or OS versions so it is what we recommend doing first. However, every BIOS is different so you will want to check your motherboard's manual to see exactly where this setting is if it exists.

Memtest 86+

One of the easiest ways to confirm that ECC is working is to use Memtest 86+. This is a great memory diagnostic program that we include on our Tools Disc that is included with every system we sell. Unfortunately, it is sometimes slow to update to support new chipsets so things like ECC detection are not reported accurately on systems with the latest hardware. If you do not have access to one of our Tools Discs you can download an ISO of Memtest 86+ and burn it to a CD/DVD instead.

Simply boot to either our Tools Disc and select "Memtest 86+" or boot to the Memtest 86+ disc and the program will load and begin running. If Memtest detects that ECC is working, it will simply show "On" in the ECC column. If it shows "off", this does not mean that ECC is not working, but rather that Memtest does not detect ECC for your chipset and you need to try one of the other methods to determine if ECC is working properly.

Memtest 86+ ECC

Ubuntu Live CD - dmidecode

Dmidecode is a utility built into Ubuntu that reports information on various aspects of the hardware in a system. The nice thing is that it is even built into the LiveCD version of Ubuntu which does not require you to actually install Ubuntu onto your system. You can simply run Ubuntu directly from a CD/DVD which leaves your actual operating system completely untouched. The downside to Dmidecode is that it only tells you if the RAM supports ECC, not if ECC is working and functional. For example, if you use a CPU that does not support ECC, but RAM that does, DmiDecode will report that that RAM is ECC capable, not that ECC is actually functional.

To start, download Ubuntu 12.10 and burn the ISO to a CD/DVD. Next, boot to the CD/DVD and when the option to either "Try Ubuntu" or "Install Ubuntu" comes up, select "Try Ubuntu" and wait for Ubuntu to load. Try Ubuntu
Once Ubuntu is fully loaded, click on the Ubuntu logo at the top-left of the screen, type "Terminal" in the search field, and click on the Terminal application. Ubuntu Launch Terminal
The first thing we need to do is to login as the root (admin). Since this is a blank OS, we first have to actually create a password for the root account by entering the command "sudo passwd root". You will prompted to enter a new password - "password" works fine. Next, type "su" and enter your password to change to the root account. Ubuntu Set Root Password

At this point, all of the initial setup is done and we can see if the RAM supports ECC. Simply enter the command "dmidecode -t memory" to list all of the information about the system's memory. This command outputs a lot of information, but the part we are concerned about is at the very beginning so you will want to scroll up to right after where you entered the command. If dmidecode detects that the RAM supports ECC, there will be an entry for "Error Correction Type:" and the type of Error Correction that is detected. If ECC support is not detected, then this entry will not be listed or will say "None".

Ubuntu dmidecode -t Memory ECC Enabled Ubuntu dmidecode -t Memory ECC Disabled
ECC detected and working ECC not detected

Again, Dmidecode only shows that the RAM itself does or does not support ECC, not that ECC is actually functional. If "Error Correction Type:" is not listed, this does not mean that ECC is not working, just that dmidecode does not detect ECC. If this is the case, we suggest trying our third and final method for determining if ECC is working which also uses an Ubuntu LiveCD.

Ubuntu Live CD - ecc_check.c

This method is courtesy of jack-kr123 on [H]ardForum and uses a small C program that you must first compile then run in Ubuntu. This is actually quite easy even for a user that is unfamiliar with Linux, but does require the use of a USB thumbdrive.

To start, copy the code for the C Program to a blank notepad file. Save the file to your USB drive as "ecc_check.c" making sure that "Save as type" is set to "All Files". Alternatively, you can create this text file directly in the Ubuntu LiveCD to avoid using a thumbdrive to transfer the file to Ubuntu. ecc_check.c
Next, plug the USB drive into the machine running the Ubuntu LiveCD (if Ubuntu is not already running, follow the first three steps in the dmidecode section to boot into the Ubuntu LiveCD and login as root). Once the drive is detected, click on the icon for the thumbdrive on the left side of the screen. Navigate to the "ecc_check.c" file, right-click on the file, and select "Copy to --> Desktop". Ubuntu Open Thumbdrive

Once the ecc_check.c file is copied to the desktop, enter the command "CD Desktop" into the terminal to change the active directory to the Desktop which is where the ecc_check.c file is now located. Next, compile the file with the command "gcc ecc_check.c -o ecc_check". You will get a few warnings, but they are expected and completely normal. The final step is to actually run the compiled program which is done with the command "./ecc_check".

The program will output a few lines of text; of which only the values in the far-right column are relevant. The values in this column represent whether ECC is working or not and correlate to the following:

0: ECC disabled
1: ECC is active in I/O; ECC logic is not active in this case.
2: ECC is disabled in I/O, but ECC logic is enabled.
3: ECC active in both I/O and ECC logic

In other words, anything but a 3 in this column indicates that this program does not detect that ECC is working. Again, this method is only an indicator that ECC is working properly, not that is it not working.

Ubuntu ecc_check.c ECC Enabled Ubuntu ecc_check.c ECC Disabled
ECC detected and working ECC not detected


For something that is critical for servers and some workstations, you would think that checking to see if ECC is working would be a simple matter. Unfortunately, we have found that there is no consistent, conclusive way to determine if ECC RAM is working properly. Even if none of the three methods we showed indicate that ECC is working, all that means is that none of them could detect that ECC is working. On the positive side, on every system we have needed to verify that ECC is working we have been able to confirm it by using one of the methods we showed in this article.

We've actually asked Intel, Kingston and Asus over the years for their recommendations for methods to confirm that ECC is working, but we haven't gotten much more back than a blank stare. While the methods we are currently using have worked for us so far, we wish that there was a better, easier, and more consistent method available. Unfortunately, until Intel or the various memory manufactures come up with a better way, we are stuck having to go through multiple programs and utilities to find one that will correctly report that ECC is actually working.

Tags: ECC, Memory, RAM