Saturday, January 5, 2013

How to test memory in OSX

If your are experiencing an occasional random rebooting then maybe there is a memory gremlin.

 A pretty good old-school memory test can be done by downloading memtest and installing it, then starting your Mac in command line mode (single user mode), and then running memtest.

  1. Download memtest
  2. Install. It will be placed in /usr/bin/
  3. Shut down the mac and restart keeping the cmd and s keys depressed. It will boot into single user mode.
  4. Run memtest by typing, memtest all
Where to get memtest
It can be found in a few places and I have used it from here before,

Multiple tests?
memtest all n

:/ root# memtest all 5

(Running 5 times took over 5 hours)

Example Output

Memtest version 4.22 (64-bit)
Copyright (C) 2004 Charles Cazabon
Copyright (C) 204-2008 Tony Scaminaci (Macintosh port)
Licensed under the GNU General Public Licence version 2 only

Max OS X 10.8.2 (12C60) running in single user mode
Memory Page Size: 4096
System has 2 Intel core(s) with SSE
Requested memory: 3864MB (4052697088 bytes)
Available memory: 3864MB (4052697088 bytes)
NOTE: Memory request is too large, reducing to acceptable value...
Allocating memory: 3756MB (3939221568 bytes) at local address 0x0000000101000000
Attempting memory lock...locked successfully
Partitioning memory into 2 comparison buffers...
Buffer A: 1878MB (196910784 bytes) starts at local address 0x0000000101000000
Buffer B: 1878MB (196910784 bytes) starts at local address 0x000000017665e020

Running 5 test sequences... (CTRL-C to quit)

Test sequence 1 of 5:

Running tests on full 3756MB region...
 Stuck Address       : ok
 Linear PRN          : ok
Running comparison tests using 1878MB buffers...
 Random Value        : ok
 Compare XOR         : ok
 Compare SYB         : ok
 Compare MUL         : ok
 Compare DIV         : ok
 Compare OR          : ok
 Compare AND         : ok
 Sequential Increment: ok
 Solid bits          : ok
 Block Sequential    : ok
 Checkerboard        : ok
 Bit Spread          : ok
 Bit Flip            : ok
 Walking Ones        : ok
 Walking Zeroes      : ok

No comments:

Post a Comment