summaryrefslogtreecommitdiff
path: root/mdstat
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-10-21 15:17:47 +0100
committerPatrick Simianer <p@simianer.de>2014-10-21 15:17:47 +0100
commit865ceea63cf8f1c070eb88e473908728cb241a6c (patch)
tree9fdd6ca5796ef5db1775d1505d10febe0e4cc86f /mdstat
parent6fab9d7234119f44777d92a826f9eb5e137738a1 (diff)
fix
Diffstat (limited to 'mdstat')
-rwxr-xr-xmdstat6
1 files changed, 6 insertions, 0 deletions
diff --git a/mdstat b/mdstat
new file mode 100755
index 0000000..fc86d3a
--- /dev/null
+++ b/mdstat
@@ -0,0 +1,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
+