Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ravenvii

macrumors 604
Original poster
Mar 17, 2004
7,585
492
Melenkurion Skyweir
NOTE: This post contains memtest 4.22 which supports OS X 10.6.8 and below. The newest version is memtest 4.23, at http://www.memtestosx.org, which supports OS X 10.7 and above.

Memtest is an essential tool for testing your RAM. If you are experiencing kernel panics or freezes, your RAM should be one of your first suspects. Or if you've just upgraded your Mac's RAM, and want to ensure that it is all good before you sell the old RAM. Or you merely want to make sure your RAM is good, so that in the future you can eliminate it as the source of the problem.

Whatever your situation is, if you need to test your RAM, Memtest OS X is the best tool for the job for your Mac. Yes, there's Memtest86+ - I always use that for all the PCs I own. However, there's a bug in Memtest86+ where it could give false positives on EFI machines (which all Intel Macs are).

Memtest, by the way, is open source. While their website requires you to pay a fee to download it, I am providing it here for free. The source code is included to comply with the GPL2 license.

To start the program, simply start it in the Terminal. It is suggested, however, that you use it in Single-User Mode for best results.

To boot into Single-User Mode, hold command-S on boot.

Then type those commands:

Code:
/sbin/fsck -fy

/sbin/mount -uw /

The first command is a quick checkup of your HD. Not strictly necessary, but it only takes a few seconds, and is generally a good idea.

Once the HD is mounted, cd (change directory) to where the memtest program is located. For example, if you put memtest in your Applications folder, the path would be:

Code:
cd /Applications
Or if you put it in the Utilities folder, it would be

Code:
cd /Applications/Utilities
And so on. You get the idea.

Then you can run memtest with a simple "./memtest" command. However, there's stuff you can customize. The first is how much memory you want to test. I'd say all, so just put "all" after "./memtest". Then comes how many times you want to run the test. 3 to 5 are good numbers, so just put that number after "all". Then you can decide whether you want the results logged or not with a -L. There's more, but those are the basics, and all you need to know.

So a simple 3-round memtest test of all available memory would be:

Code:
./memtest all 3
That's it.
 

Attachments

  • memtest.dmg.zip
    113 KB · Views: 2,030
Last edited:
  • Like
Reactions: Naaaaak

ikermalli

macrumors 6502a
Aug 9, 2008
691
0
He's been here almost 5 years and has 4000+ posts and he is giving out the binary for it free. Doesn't seem like an advertisement.

Thanks for this, does this work with Snow Leopard?
 

appleguru1

macrumors 6502
Mar 13, 2003
307
4
Thanks for this!

This is the latest Memtest version 4.22 (64-bit) :)

Though the developer's $1.39 fee is hardly unfair, and AFAICT is permitted per the GPL v2 that it is licensed under. I'm fairly certain he has to make the source available though..
 

krunk

macrumors regular
Jan 29, 2004
236
0
Have you requested the source?

Memtest, by the way, is open source. So why, then, do you have to pay to download it? You have to pay to download both the binary and the source. I believe this violates the GPL, which Memtest OS X, and Memtest before it, are released under.

Have you asked for the source from the author? If I understand the GPL correctly, you are not required to host the source. But you are required to provide the source if asked.

-james
 

ravenvii

macrumors 604
Original poster
Mar 17, 2004
7,585
492
Melenkurion Skyweir
Have you asked for the source from the author? If I understand the GPL correctly, you are not required to host the source. But you are required to provide the source if asked.

-james

You are required to pay the money to download memtest to get the source. Which is why I went and put memtest up here for free. If the developer puts up the source without the download fee, then I would remove the download here, since the developer is acting within the GPL license. Since he is not, I decided to take things into my own hands :)

And re: Rember, memtest is better because you can use it in single-user mode, and hence memtest will be able to test more of your memory than Rember can (it couldn't test memory that's tied up by OS X, UI elements and programs running in the background).
 

Silencio

macrumors 68040
Jul 18, 2002
3,456
1,563
NYC
Memtest is also bundled with AppleJack. It provides a simplified user interface for running Memtest from Single User Mode, amongst numerous other useful maintenance and troubleshooting scripts. I install this on every Mac I look after.

http://applejack.sourceforge.net/
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
I picked up Applejack based on this thread. Thanks!

Only problem I have now is getting my Mac to boot into single user mode using the 64 bit kernel so I can test my 8 GB of RAM from OWC with the lock on.

EDIT: solved
Code:
nvram boot-args="arch=x86_64 -s"
reboot

B
 
Last edited:

graxspoo

macrumors newbie
Jun 12, 2008
2
0
memtest vs memtest86+ / 64-bit kernel mode

Hey, I'm having a weird problem with memtest. I just put 8 gigs in my new mac mini. Hit the "can't lock" issue with the 32 kernel mode, so figured out how to reboot in 64-bit kernel mode and single user mode. Ran memtest again, and it reported errors. After some swearing, I put the old memory back in, and, for another data point, rebooted into 64-bit kernel/single user mode and ran memtest again (now on the OEM memory) AGAIN errors reported. So, rebooted into 32 bit mode/single user, ran tests again NO ERRORS. Put the 8 gigs of memory back in, ran the tests again (32 bit/single user) NO ERRORS.

So in summery:
64 bit/single user mode: errors on both old and new memory
32 bit/single user mode: all tests pass on old and new memory

(in each case the command used was memtest all 3)

I'm beginning to think that memtest 4.22 can't be trusted in 64 bit kernel mode. Any advice? Does anyone have experience with memtest86+ what is the difference between that memory tester and memtest?
TIA
 

peanutismint

macrumors 6502
Apr 4, 2007
437
9
Cardiff, UK
I may be doing something wrong here but I'm running Snow Leopard and don't seem to be getting far with Memtest in single user mode (I purchased the program before finding this thread!)....

'sbin/fsck -fy' gives me an '...is not recognized as an internal or external command...' error

'sbin/mount -uw' gives me 'unknown flag '-uw'


Am I doing something completely stupid here that I can't see?!
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
Has to be /sbin/fsck -fy

That first backslash is very important....

I see no backslashes here. There are two slashes, though.

And if the working directory is / then "sbin/fsck" would work, but since the post is over 6 months old, it's probably too late to ask if he remembers what the working dir was.
 

danpritts

macrumors newbie
Sep 26, 2007
5
0
No GPL violation to require payment

It is not a violation of the GPL to sell a derivative work. If it were, Apple would be in trouble for much of OS X (e.g., /bin/bash), which is also GPL licensed.

It *would* be a violation of the GPL to sell or otherwise distribute a derivative work, AND not distribute the source code with your changes.

Whether it is legal for you to distribute his derivative work (not the source code) is another question. I'm not sure but that might be illegal, if he claims copyright on the compiled binaries.

It would be legal to distribute his modified source, or to compile and distribute your own copy.
 

ceet12

macrumors newbie
May 2, 2012
17
0
hi thanks for the program and info, I'm about to install and use

but how would i go about uninstalling once finished?

Regards
 

MemtestAuthor

macrumors newbie
Nov 12, 2014
1
0
Memtestosx is distributed under GPL version 2 which permits a download fee. GPL 2 requires that all distributions of memtestosx include the source code OR the person distributing it must provide the source code on demand. In the case of memtestosx, this means that the person distributing memtest must provide the entire contents of the DMG file downloaded from the memtestosx web site. Posting only the executable binary for download and being unable to provide the remaining contents of the DMG file on demand is in violation of GPL version 2 and may result in prosecution. If you want to distribute memtestosx free of charge, you must provide the entire contents of the original DMG file.

Thank you Dan for providing some clarity to those who don't bother to read the GPL 2 license prior to subjugating both authors' copyrights.

Memtestosx Author

------------------------------

It is not a violation of the GPL to sell a derivative work. If it were, Apple would be in trouble for much of OS X (e.g., /bin/bash), which is also GPL licensed.

It *would* be a violation of the GPL to sell or otherwise distribute a derivative work, AND not distribute the source code with your changes.

Whether it is legal for you to distribute his derivative work (not the source code) is another question. I'm not sure but that might be illegal, if he claims copyright on the compiled binaries.

It would be legal to distribute his modified source, or to compile and distribute your own copy.
 

ravenvii

macrumors 604
Original poster
Mar 17, 2004
7,585
492
Melenkurion Skyweir
Memtestosx is distributed under GPL version 2 which permits a download fee. GPL 2 requires that all distributions of memtestosx include the source code OR the person distributing it must provide the source code on demand. In the case of memtestosx, this means that the person distributing memtest must provide the entire contents of the DMG file downloaded from the memtestosx web site. Posting only the executable binary for download and being unable to provide the remaining contents of the DMG file on demand is in violation of GPL version 2 and may result in prosecution. If you want to distribute memtestosx free of charge, you must provide the entire contents of the original DMG file.

Thank you Dan for providing some clarity to those who don't bother to read the GPL 2 license prior to subjugating both authors' copyrights.

Memtestosx Author

I have updated the download to include the entire DMG file. Thank you for the clarification.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.