Linux/ECC: Difference between revisions

From Omnia
Jump to navigation Jump to search
No edit summary
Line 9: Line 9:


Check if ECC is supported:
Check if ECC is supported:
  dmidecode | grep -i ecc
  sudo dmidecode -t memory | grep -i ecc
  lshw | grep -i ecc
  sudo lshw | grep -i ecc


Check if ECC is enabled in the OS: <ref>https://www.truenas.com/community/threads/small-form-factor-home-nas-build-hardware-feedback-and-some-questions.14484/page-2</ref> <ref>http://pastebin.com/sxd7QcYj</ref>
Check if ECC is enabled in the OS: <ref>https://www.truenas.com/community/threads/small-form-factor-home-nas-build-hardware-feedback-and-some-questions.14484/page-2</ref> <ref>http://pastebin.com/sxd7QcYj</ref>

Revision as of 17:32, 28 September 2026

Error-Correcting Code Random Access Memory

ECC RAM (Error-Correcting Code Random Access Memory) is a specialized type of computer memory that can detect and automatically correct single-bit data corruption in real time.

ECC needs to BOTH be Supported and Enabled

You can have ECC RAM installed, but not enabled. So you need to both check to see if the system supports it, and if it is enabled in both BIOS and OS.

Check if ECC is supported:

sudo dmidecode -t memory | grep -i ecc
sudo lshw | grep -i ecc

Check if ECC is enabled in the OS: [1] [2]


Python Check Script

Well, I was going to wait until tomorrow to do this, but when I get an itch, I have to scratch it. :-D I successfully ported the ecc_check C program to python, and it works perfectly. Here's what it gives me on my FreeNAS system:

5004-5007h: 20 0 62 3
5008-500Bh: 20 0 62 3

The last byte can be decoded as such (according to this thread)

According to Intel's datasheet:
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

So it seems I am running with ECC.

You can grab the python code here: http://pastebin.com/sxd7QcYj

If somebody doesn't beat me to it, I'll make another thread dedicated to the python version of this code tomorrow, so it's not buried here.

Now off to bed for me.

Thanks, Steve

keywords