[clug] Is there a way to test physical memory without rebooting to memtest?

Tony Lewis tony at lewistribe.com
Sun Dec 19 11:17:54 UTC 2021


I have a Linux server as the gateway plus other stuff, and I want to 
test the RAM.  With teenagers at home on school holidays, I am held to 
cloud-esqe availability SLAs.  I would like to test the memory of the 
server with no downtime.

I know of memtester[0], but under normal usage, you don't have any 
control over which physical memory is tested.  So it becomes some kind 
of statistical endeavour to run it enough times with sufficient changes 
inbetween to get some level of confidence that all memory has been tested.

Memtester also has an option for forcing it to use a physical address, 
but the man page[1] warnings are ominous and seems to indicate that it 
doesn't try to free up that physical memory:

               Note that the memory region will be overwritten
               during testing, so it is not safe to specify memory which 
is allocated for the system or for  other  applications;
               doing so will cause them to crash.

So is there a way to achieve this, even if it takes time and has a minor 
performance impact?  For example, a command that forces a certain part 
of physical memory to be freed up so that memtester can safely test it?  
I'm thinking something analogous to swapoff (virtual memory) and pvmove 
(logical volume extents).

Or is my reading of the man page wrong, and the physical parameter is 
safe to use if I do sensible chunk sizes according to the system usage?

Tony

[0] https://pyropus.ca./software/memtester/

[1] https://linux.die.net/man/8/memtester



More information about the linux mailing list