Skip to content

Instantly share code, notes, and snippets.

@tuxdna
Created February 14, 2025 09:50
Show Gist options
  • Save tuxdna/f97e869794e20f5309064e97a0d0dfab to your computer and use it in GitHub Desktop.
Save tuxdna/f97e869794e20f5309064e97a0d0dfab to your computer and use it in GitHub Desktop.
Testing for bad RAM

Option 1: Using memtester

sudo apt install memtester
sudo memtester 16G 1
memtester version 4.6.0 (64-bit)
Copyright (C) 2001-2020 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffffffffffff000
want 16384MB (17179869184 bytes)
got  16384MB (17179869184 bytes), trying mlock ...locked.
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : testing  46

Option 2: Using stress-ng


sudo apt install stress-ng

stress-ng --vm 1 --vm-bytes 50% --vm-method all --verify -t 10m

Option 2: Using memtest86+

sudo apt install memtest86+

This adds a menu in GRUB bootloader. Use this boot option to conuct test.

Also look at this reference: https://www.baeldung.com/linux/ram-testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment