check for corrupted memory
This commit is contained in:
parent
614aa4eca3
commit
4e201c68be
18
modules/memory-health.sh
Normal file
18
modules/memory-health.sh
Normal 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
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
name='Memory'
|
||||
name='Memory Usage'
|
||||
available=1
|
||||
recommend=1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user