What is the memtester tool called here?

Started by drosophila, March 14, 2026, 06:06:24 PM

Previous topic - Next topic
The usual way of booting memtest86+ is highly disruptive, so it would be nice to have a tool like memtester that could be run during normal operation, maybe even scheduled monthly runs, since memory issues can develop over time so monitoring might be good. The plugins section doesn't provide anything of that sort/name so what am I overlooking?

March 14, 2026, 06:40:35 PM #1 Last Edit: March 14, 2026, 06:46:09 PM by Mpegger
Quote from: drosophila on March 14, 2026, 06:06:24 PM... so what am I overlooking?

For the same reason a program like badblocks can't test a drive that is mounted and in use, memtest can't test RAM while it's in use by anything other then itself.

Quotememtester will malloc(3) the amount of memory specified, if possible. If this 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, testing will be slower and much less effective. Run memtester as root so that it can mlock the memory it tests

What would be the benefit of running memtest86+ if it cannot test all of the installed memory?  Only testing a portion of your memory does not give you any conclusive result.  And avoiding memory used by the system/OS is even less valuable, for this would be the area which you would really wish to know if there is an issue.

I know that it can only test the memory that is not in use. That is an obvious drawback of running on a live system. And just like badblock-testing only a portion of the harddrive, it will catch more errors than not running any test at all. Especially errors that affect the entire module, like a failing connection or a short will produce. It will obviously not catch individual cell damage. However, it will catch sporadic errors, like those from marginal voltage regulation even more likely than running memtest for only one or two tests because it can run for longer because there will not be any downtime. Like badblock testing parts of a harddrive will catch things like failing head-amps, alignment problems and other stuff that affects the operation of the entire drive, and since these things tend to spread, even if it won't catch them necessarily immediately, it will probably catch them before the system becomes unreliable and even if not give you an indication. Memtest86+ will also not catch all memory issues, so the same argument could be made: "why test at all if it won't catch 100% of all errors"...

Running some test will always result in catching more errors than running no test, and that is the entire point. So, thanks for the responses but my question remains unanswered. So this probably means that this tool is not included.

Quote from: drosophila on March 14, 2026, 06:06:24 PMThe plugins section doesn't provide anything of that sort/name so what am I overlooking?
That you are looking for ECC RAM + CPU and Motherboard that support it.

Such software tool does not exist unless you run Windows from the Windows 95/98 era and use tools that were more a workaround instead of anything actually useful ;)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Today at 07:40:32 PM #5 Last Edit: Today at 07:50:26 PM by drosophila
Quote from: nero355 on Today at 04:09:16 AMThat you are looking for ECC RAM + CPU and Motherboard that support it.
DEC4280 – OPNsense® Rack Security Appliance
Memory    64GB DDR4

So Decisio is just understating their hardware capabilities, even on their top of the line products? ;)
Quote from: nero355 on Today at 04:09:16 AMSuch software tool does not exist unless you run Windows from the Windows 95/98 era and use tools that were more a workaround instead of anything actually useful ;)
Like this?
https://man.freebsd.org/cgi/man.cgi?query=memtester&apropos=0&sektion=8&manpath=FreeBSD+15.0-RELEASE+and+Ports&format=html

Which actually is what I was asking about, but according to pkg, it's not even in our repository (let alone that it's not advisable to manually install stuff on a curated system like OPNsense).

Not sure if this will suit your needs/usecase but I am using stress-ng. You can install it on OPN directly.

I use it to test CPU single/multicore, turbo, PL states and as well memory or combination of high CPU/turbo load with high memory load.

Usually when I get a new HW that I want to run OPN on, I just use this tool to test for stability. Recently it helped me to discover an instability during turbo boost with high memory load.

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
N355 - i226-V | AQC113C | 16G | 500G - PROD

PRXMX
N5105 - i226-V | 2x8G | 512G - NODE #1
N100 - i226-V | 16G | 1T - NODE #2

Today at 08:21:59 PM #7 Last Edit: Today at 08:23:47 PM by Mpegger
Memtester is a user space application. It can never test RAM that is in use (allocated).

As far as I understand it (I am not a programmer), in simplest terms to be capable of doing such a thing as testing RAM that is in use, would require it to be baked into the OS kernal itself, as the OS would need to move data in RAM that is in use to other sections to allow such a RAM testing application to test those sectors. This would require a very high level of choreography between the OS, the RAM testing application, and all the other applications that are loaded in, running in, and using RAM as those programs need to be aware that the sectors of RAM allocated to them could change at any given time. The programs would need to be "Live RAM Testing" aware, or such an action would fail (the program would error out because the data it expects in a specific sector of the RAM is no longer there). It's the same reason some backup programs for VMs require the VM being backed up to be shutdown, cause it can't handle data on a drive being live (actively in use) or "locked" (only the OS can access said data).

There probably is a way to have memtester available in Opnsense, but again, running it while Opnsense is live will only result in the unused free RAM being tested. You would need to shutdown and boot into a RAM tester like Memtester86+ in order to test all the system RAM.