Section: Maintenance Commands (8)
Updated: July 2009Index
memtester - stress test to find memory subsystem faults.
memtester is an effective userspace tester for stress-testing the memorysubsystem. It is very effective at finding intermittent and non-deterministicfaults. Note that problems in other hardware areas (overheating CPU, out-of-specification power supply, etc.) can cause intermittent memory faults,so it is still up to you to determine where the fault lies through normalhardware diagnostic procedures; memtester just helps you determine whethera problem exists.
memtester will malloc(3) the amount of memory specified, if possible. Ifthis fails, it will decrease the amount of memory requested until it succeeds.It will then attempt to mlock(3) this memory; if it cannot do so, testingwill be slower and much less effective. Run memtester as root so that itcan mlock the memory it tests.
Note that the maximum amount of memory that memtester can test will be lessthan the total amount of memory installed in the system; the operating system,libraries, and other system limits take some of the available memory.memtester is also limited to the amount of memory available to a singleprocess; for example, on 32-bit machines with more than 4GB of memory,memtester is still limited to less than 4GB.
Note that it is up to you to know how much memory you can safely allocatefor testing. If you attempt to allocate more memory than is available,memtester should figure that out, reduce the amount slightly, and try again.However, this can lead to memtester successfully allocating and mlockingessentially all free memory on the system -- if other programs are running,this can lead to excessive swapping and slowing the system down to the pointthat it is difficult to use. If the system allows allocation of more memorythan is actually available (overcommit), it may lead to a deadlock, wherethe system halts. If the system has an out-of-memory process killer (likeLinux), memtester or another process may be killed by the OOM killer.
So choose wisely.
- -p PHYSADDR
- tells memtester to test a specific region of memory starting at physical address PHYSADDR (given in hex), by mmap(2)ing /dev/mem. This is mostly ofuse to hardware developers, for testing memory-mapped I/O devices and similar.Note that the memory region will be overwritten during testing, so it is notsafe to specify memory which is allocated for the system or for otherapplications; doing so will cause them to crash. If you absolutely must testa particular region of actual physical memory, arrange to have that memoryallocated by your test software, and hold it in this allocated state, thenrun memtester on it with this option.
- the amount of memory to allocate and test, in megabytes by default. You caninclude a suffix of B, K, M, or G to indicate bytes, kilobytes, megabytes, orgigabytes respectively.
- (optional) number of loops to iterate through. Default is infinite.
memtester must be run with root privileges to mlock(3) its pages. Testingmemory without locking the pages in place is mostly pointless and slow.
memtester's exit code is 0 when everything works properly. Otherwise,it is the logical OR of the following values:
- error allocating or locking memory, or invocation error
- error during stuck address test
- error during one of the other tests
Written by Charles Cazabon.
Report bugs to <charlesc-memtester-bugsAATTpyropus.ca>.
Copyright © 2009 Charles Cazabon
This is free software; see the file COPYING for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- EXIT CODE
- REPORTING BUGS
This document was created byman2html,using the manual pages.