1memtester(8)                 Maintenance Commands                 memtester(8)
2
3
4

NAME

6       memtester - stress test to find memory subsystem faults.
7

SYNOPSIS

9       memtester [-p PHYSADDR [-d DEVICE]] <MEMORY> [ITERATIONS]
10

DESCRIPTION

12       memtester  is an effective userspace tester for stress-testing the mem‐
13       ory subsystem.  It is very effective at finding intermittent  and  non-
14       deterministic  faults.   Note  that  problems  in  other hardware areas
15       (overheating CPU, out-of-specification power supply,  etc.)  can  cause
16       intermittent memory faults, so it is still up to you to determine where
17       the fault lies through normal hardware diagnostic procedures; memtester
18       just helps you determine whether a problem exists.
19
20       memtester  will  malloc(3) the amount of memory specified, if possible.
21       If this fails, it will decrease the amount of memory requested until it
22       succeeds.   It  will then attempt to mlock(3) this memory; if it cannot
23       do so, testing will be slower and much less effective.   Run  memtester
24       as root so that it can mlock the memory it tests.
25
26       Note  that the maximum amount of memory that memtester can test will be
27       less than the total amount of memory installed in the system; the oper‐
28       ating  system,  libraries,  and  other  system  limits take some of the
29       available memory.  memtester is also limited to the  amount  of  memory
30       available  to  a  single  process; for example, on 32-bit machines with
31       more than 4GB of memory, memtester is still limited to less than 4GB.
32
33       Note that it is up to you to know how much memory you can safely  allo‐
34       cate  for  testing.   If  you  attempt  to allocate more memory than is
35       available,  memtester  should  figure  that  out,  reduce  the   amount
36       slightly,  and try again.  However, this can lead to memtester success‐
37       fully allocating and mlocking essentially all free memory on the system
38       --  if  other programs are running, this can lead to excessive swapping
39       and slowing the system down to the point that it is difficult  to  use.
40       If  the system allows allocation of more memory than is actually avail‐
41       able (overcommit), it may lead to a deadlock, where the  system  halts.
42       If  the  system  has  an  out-of-memory  process  killer  (like Linux),
43       memtester or another process may be killed by the OOM killer.
44
45       So choose wisely.
46

OPTIONS

48       -p PHYSADDR
49              tells memtester to test a specific region of memory starting  at
50              physical address PHYSADDR (given in hex), by mmap(2)ing a device
51              specified by the -d option  (below,  or  /dev/mem  by  default).
52              This  is  mostly of use to hardware developers, for testing mem‐
53              ory-mapped I/O devices and similar.  Note that the memory region
54              will be overwritten during testing, so it is not safe to specify
55              memory which is allocated for the system or for  other  applica‐
56              tions;  doing  so  will  cause them to crash.  If you absolutely
57              must test a particular region of actual physical memory, arrange
58              to have that memory allocated by your test software, and hold it
59              in this allocated state, then run  memtester  on  it  with  this
60              option.
61
62       MEMORY the  amount  of  memory  to  allocate  and test, in megabytes by
63              default.  You can include a suffix of B, K, M, or G to  indicate
64              bytes, kilobytes, megabytes, or gigabytes respectively.
65
66       ITERATIONS
67              (optional) number of loops to iterate through.  Default is infi‐
68              nite.
69

ENVIRONMENT

71       If the  environment  variable  MEMTESTER_TEST_MASK  is  set,  memtester
72       treats  the  value  as  a  bitmask of which tests (other than the stuck
73       address test) to run.  The value can be specified in decimal, in  octal
74       (with  a  leading  0), or in hexadecimal (with a leading 0x).  The spe‐
75       cific bit values corresponding to  particular  tests  may  change  from
76       release  to  release;  consult  the list of tests in the source for the
77       appropriate index values for the version of memtester you are  running.
78       Note  that  skipping  some  tests  will  reduce  the  time it takes for
79       memtester to run, but also reduce memtester's effectiveness.
80

NOTE

82       memtester must be run with  root  privileges  to  mlock(3)  its  pages.
83       Testing  memory  without locking the pages in place is mostly pointless
84       and slow.
85

EXIT CODE

87       memtester's exit code is 0 when everything works properly.   Otherwise,
88       it is the logical OR of the following values:
89
90       x01    error allocating or locking memory, or invocation error
91
92       x02    error during stuck address test
93
94       x04    error during one of the other tests
95

AUTHOR

97       Written by Charles Cazabon.
98

REPORTING BUGS

100       Report bugs to <charlesc-memtester-bugs@pyropus.ca>.
101
103       Copyright © 2001-2012 Charles Cazabon
104       This  is  free  software;  see the file COPYING for copying conditions.
105       There is NO warranty; not even for MERCHANTABILITY  or  FITNESS  FOR  A
106       PARTICULAR PURPOSE.
107
108
109
110memtester 4                        June 2012                      memtester(8)
Impressum