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 :)

March 17, 2026, 07:40:32 PM #5 Last Edit: March 17, 2026, 07:50:26 PM by drosophila
Quote from: nero355 on March 17, 2026, 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 March 17, 2026, 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

March 17, 2026, 08:21:59 PM #7 Last Edit: March 17, 2026, 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.

Quote from: drosophila on March 17, 2026, 07:40:32 PMDEC4280 – OPNsense® Rack Security Appliance
Memory    64GB DDR4

So Decisio is just understating their hardware capabilities, even on their top of the line products? ;)
No idea what they are using, but I was pretty much 100% disappointed by the Transcend SSD they were using in some older model mentioned recently : It's barely different than all those Consumer Level SSDs out there and has no Power Loss Capacitors for example :(

Not something you would expect inside a very expensive appliance...

QuoteLike 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
Then you should have mentioned it, but again : Not something that I would actually use and trust completely...

Quotebut 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).
Actually I have not seen a lot of posts being against it so my guess is that you can do it as long as you are aware of potential conflicts when you get some kind of error during updating/upgrading in the future :)

If you really want something to do tests with then this is a better alternative IMHO :
Quote from: Seimus on March 17, 2026, 08:12:54 PMNot sure if this will suit your needs/usecase but I am using stress-ng. You can install it on OPN directly.
There are many similar tools and they will all actually do something useful for you unlike memtesting on a live system.

Quote from: Mpegger on March 17, 2026, 08:21:59 PMIt'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).
Backup issues because of files being in use... ohh man... I remember the hell I had with those a long time ago with a Novell File Server... THE HORROR !!!

Thanks for reminding me... LOL! :P
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

March 19, 2026, 10:41:40 PM #9 Last Edit: March 19, 2026, 10:43:21 PM by drosophila
Quote from: nero355 on March 18, 2026, 04:36:19 PMThen you should have mentioned it, but again : Not something that I would actually use and trust completely...
The reason I didn't ask for this specifically was that this tool seems to be pretty niche and possibly not up to snuff security/trust-wise. I expected something more official that I just never had heard of.
Quote from: nero355 on March 18, 2026, 04:36:19 PM
Quotebut 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).
Actually I have not seen a lot of posts being against it so my guess is that you can do it as long as you are aware of potential conflicts when you get some kind of error during updating/upgrading in the future :)
Yes, the issue with all non-stock setups. Documentation is a must and even then there's no guarantee I'll remember to check on it. That's why I've come to avoid anything that's not at least in the official repository. :)
Quote from: nero355 on March 18, 2026, 04:36:19 PMIf you really want something to do tests with then this is a better alternative IMHO :
Quote from: Seimus on March 17, 2026, 08:12:54 PMNot sure if this will suit your needs/usecase but I am using stress-ng. You can install it on OPN directly.
That's the kind of hint I was hoping for. :) I'll look into this since I intend to do periodic tests like I schedule periodic SMART extended tests. It really is supposed to do only light testing to catch RAM going bad over time, I had this happen to me twice already and normally you suspect the PSU if a system becomes unreliable years after it passed the initial pre-deployment tests. It doesn't have to catch the very first error.

Regarding the "testing only unused memory" sentiment: yes, anything that runs on a live system can only test the unallocated memory. It might have ways to cooperate with the paging service (which may be able to swap out / around pages of memory). My assumption is that if memory goes bad, the issue affects either an entire column or repeating rows (assuming that lines fail). Marginal cells / connections may go unnoticed for a while, but likewise they will do so if the system were to be shut down for scheduled manual memtest86+ runs every 6 months or so, especially if only one single pass is done each time.

Anyway, thanks for the hints @all! :) I'll see whether I do install the memtester tool from ports or find a way to do some lightweight testing through stress-ng through a cron job. I really want to test live and automatically. :)

Quote from: drosophila on March 19, 2026, 10:41:40 PMlightweight testing through stress-ng through a cron job.

Yea, careful with this. At the end this tool is a stress test, you can really hammer down the system if you desire so.

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