summaryrefslogtreecommitdiff
path: root/mdstat
blob: fc86d3ae9f5a63c55c4845a108c1f734a5a73c67 (plain)
1
2
3
4
5
6
#!/bin/zsh

S=$(awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' </proc/mdstat)
STATUS=$(echo $S | cut -d" " -f2)
if [[ $STATUS != "[UUUU]" ]]; then logger "[mdstat warning] $S"; fi