How to Test RAM Under Mac OS X

New RAM!
RAM SO-DIMMWhenever I get a new stick of RAM for my Mac or PC, I’m always eager to just plug it in and start using it to its fullest, but having worked on hundreds of computers and encountering dozens of bad memory modules has convinced me that thorough testing a must. While off-the-shelf PCs can run a copy of the free — and very handy — Ultimate Boot CD tool to perform RAM tests, Macs are a little bit more complicated in this respect. If you’ve purchased AppleCare for your Mac, it comes with a bootable TechTool Deluxe disc, but you’re otherwise left to your own devices when it comes to hardware issues.

A Note About Single User Mode
Fortunately, with a little preparation right now, you can boot your Mac into Single User Mode and do a complete RAM test in the future. While you can run the necessary software in a fully-booted system, I recommend doing testing in Single User Mode where there are far less programs loaded in memory, and less chance of an important system component getting corrupted if your machine freezes or kernel panics — common symptoms of bad memory. A modified Mac OS X boot CD would be ideal, but that’s another post for another day!

Software Setup
The testing setup isn’t terribly complex; I’ve taken the liberty of putting together an installable package which will put the Memtest utility and its man page entry in your /usr/bin/ and /usr/share/man/ folders, respectively (if you wish to put them elsewhere, you can always just extract the contents of the .pkg with Pacifist). Memtest is a Unix command-line program that does the memory testing, and is the Mac equivalent of MemTest86.

Memtest Usage
To run memtest on a new memory module, first shut down your computer and install the new chip. (Some helpful guides for doing this can be found at iFixit, if you’re unsure of the exact steps.) Ensure the chip is firmly in place, close up your machine (or don’t, if you’re a pessimist), and power it on while holding down the Command and S keys to force Mac OS X to boot into Single User Mode. Once you see a black screen with white text, you can release the key combination. After all the system logging is done scrolling past, type memtest all 2 to test ‘all’ memory ‘2′ times. Two passes should be enough to detect any blatant problems, but I wouldn’t hesitate to let it run for hours on end if I suspected an intermittent memory problem (memtest all). When complete, you should be greeted with “All tests passed” if your new RAM is in good condition. If your system locks up or freezes indefinitely during the test, you may have a bad memory module on your hands.

Trackbacks & Pingbacks

  1. [...] Die originale DVD vom Macbook Pro habe ich leider grad nicht vor Ort .. gut … okay … hab ein bisschen bei Google gesucht und folgendes gefunden: Memorytest unter MacOs [...]

Comments

  1. Rember is a nice GUI for memtest, but you’re not running in Single User Mode if that’s a concern.

    http://www.kelleycomputing.net/rember/

  2. For what it’s worth, I tried extracting the memtest binary from Rember, but apparently it’s too old (or something) to run under Leopard’s Single User Mode. It just sits there…

Leave a Reply