summaryrefslogtreecommitdiffstats
path: root/core/modules/hardware-stats/data/opt/openslx/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/hardware-stats/data/opt/openslx/scripts')
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
index e87c41e1..618326aa 100755
--- a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
+++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
@@ -199,12 +199,16 @@ if which smartctl; then
OVERALL=$(grep -o "test result: .*$" "$FILE" | cut -c 14-)
[ "x$OVERALL" = "xPASSED" ] && OVERALL=""
REALLOC=$(grep "^ *5 " "$FILE" | awk '{print $8}')
+ PENDING=$(grep "^ *197 " "$FILE" | awk '{print $8}')
SPINRETRY_VAL=$(grep "^ *10 " "$FILE" | awk '{print $4}')
SPINRETRY_THR=$(grep "^ *10 " "$FILE" | awk '{print $6}')
[ -n "$OVERALL" ] && BADSECTORS=$(( $BADSECTORS + 100 ))
if [ -n "$REALLOC" ] && [ "$REALLOC" -gt "0" ]; then
BADSECTORS=$(( $BADSECTORS + $REALLOC ))
fi
+ if [ -n "$PENDING" ] && [ "$PENDING" -gt "5" ]; then
+ BADSECTORS=$(( $BADSECTORS + $PENDING ))
+ fi
if [ -n "$SPINRETRY_VAL" ] && [ "$SPINRETRY_VAL" -le "$SPINRETRY_THR" ]; then
BADSECTORS=$(( $BADSECTORS + 100 ))
fi