summaryrefslogtreecommitdiff
path: root/monitor_soft_raid
diff options
context:
space:
mode:
Diffstat (limited to 'monitor_soft_raid')
-rwxr-xr-xmonitor_soft_raid6
1 files changed, 6 insertions, 0 deletions
diff --git a/monitor_soft_raid b/monitor_soft_raid
new file mode 100755
index 0000000..fc86d3a
--- /dev/null
+++ b/monitor_soft_raid
@@ -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
+