check for corrupted memory

This commit is contained in:
Jonas Maier 2025-12-04 12:13:33 +01:00
parent 614aa4eca3
commit 4e201c68be
Signed by: jonas
SSH Key Fingerprint: SHA256:yRTjlpb3jSdw2EnZLAWyB4AghBPI8tu42eFXiICyb1U
2 changed files with 19 additions and 1 deletions

18
modules/memory-health.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
name='Memory Health'
recommend=1
if command -v memtester >/dev/null 2>&1; then
available=1
else
available=0
fi
check() {
output=$(memtester 1G 1 | grep -v 'too many pages')
if printf '%s\n' "$output" | grep -qi 'fail'; then
warn "" "fail" "$output"
else
ok "" "ok" "$output"
fi
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
name='Memory'
name='Memory Usage'
available=1
recommend=1