forked from finn/tinyboard
health-check.sh: fix total disk usage label to show root filesystem instead of empty mount point
This commit is contained in:
@@ -67,11 +67,11 @@ check_disk() {
|
|||||||
total_kb=$(df --block-size=1K / | awk 'NR==2 {print $2}')
|
total_kb=$(df --block-size=1K / | awk 'NR==2 {print $2}')
|
||||||
total_pct=$(( used_kb * 100 / total_kb ))
|
total_pct=$(( used_kb * 100 / total_kb ))
|
||||||
if [ "$total_pct" -ge 90 ]; then
|
if [ "$total_pct" -ge 90 ]; then
|
||||||
fail "Total disk usage at ${total_pct}% on / — critically low"
|
fail "Total disk usage at ${total_pct}% (root filesystem) — critically low"
|
||||||
elif [ "$total_pct" -ge 80 ]; then
|
elif [ "$total_pct" -ge 80 ]; then
|
||||||
warn "Total disk usage at ${total_pct}% on /"
|
warn "Total disk usage at ${total_pct}% (root filesystem)"
|
||||||
else
|
else
|
||||||
ok "Total disk usage at ${total_pct}% on /"
|
ok "Total disk usage at ${total_pct}% (root filesystem)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user