Memtest OS X - Essential Tool for Testing Your RAM

Discussion in 'Mac Basics and Help' started by ravenvii, Sep 17, 2009.

  1. ravenvii, Sep 17, 2009
    Last edited: May 9, 2015

    macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #1
    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.
     

    Attached Files:

  2. macrumors regular

    Joined:
    Sep 15, 2008
    Location:
    Newton, IA
    #2
    This sure looks an awful lot like an advertisement..
     
  3. macrumors 6502a

    Joined:
    Aug 9, 2008
    #3
    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?
     
  4. thread starter macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #4
    Yep it does work perfectly under Snow Leopard. 64-bit mode and all.
     
  5. macrumors regular

    Joined:
    Sep 15, 2008
    Location:
    Newton, IA
    #5
    Oh, okay I get it. Sorry about that OP. Thanks by the way!
     
  6. macrumors 6502

    Joined:
    Mar 13, 2003
    #6
    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..
     
  7. macrumors 6502a

    rpaloalto

    Joined:
    Sep 19, 2005
    Location:
    Palo Alto CA.
    #7
    Thanks:)
     
  8. macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
    #8
  9. macrumors 6502a

    Joined:
    Jun 29, 2002
    Location:
    Eastern seaboard
    #9
    :rolleyes: You're just too cool for school.
     
  10. macrumors regular

    Joined:
    Sep 15, 2008
    Location:
    Newton, IA
    #10
    Did you even read the rest of the thread?
     
  11. macrumors regular

    Joined:
    Jan 29, 2004
    #11
    Have you requested the source?

    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
     
  12. thread starter macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #12
    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).
     
  13. macrumors newbie

    Joined:
    Feb 20, 2008
    #13
    thanks to the OP!
     
  14. macrumors 68000

    Silencio

    Joined:
    Jul 18, 2002
    Location:
    NYC
    #14
    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/
     
  15. balamw, Dec 2, 2010
    Last edited: Dec 2, 2010

    Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #15
    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
     
  16. macrumors newbie

    Joined:
    Dec 14, 2009
    #16
    you have done a great job.
     
  17. macrumors newbie

    Joined:
    Jun 12, 2008
    #17
    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
     
  18. macrumors 6502

    peanutismint

    Joined:
    Apr 4, 2007
    Location:
    Cardiff, UK
    #18
    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?!
     
  19. rw3
    macrumors 6502a

    rw3

    Joined:
    May 13, 2008
    Location:
    DFW, TX
    #19
    Has to be /sbin/fsck -fy

    That first backslash is very important....
     
  20. macrumors 603

    Joined:
    Aug 9, 2009
    #20
    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.
     
  21. macrumors newbie

    Joined:
    Sep 26, 2007
    #21
    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.
     
  22. macrumors newbie

    Joined:
    May 2, 2012
    #22
    hi thanks for the program and info, I'm about to install and use

    but how would i go about uninstalling once finished?

    Regards
     
  23. macrumors newbie

    Joined:
    Nov 12, 2014
    #23
    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

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

     
  24. thread starter macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #24
    I have updated the download to include the entire DMG file. Thank you for the clarification.
     

Share This Page