You are not logged in.
Pages: 1
I wrote a tiny script to monitor the status of RAID arrays. It is written in awk and is meant to be used with conky. I have this in my conky config file:
RAID: ${execi 60 gawk -f path-to-the-script /proc/mdstat}
#!/bin/gawk -f
# This script checks the status of RAID arrays from /proc/mdstat
/_/ { state = "Warning!"; exit }
/blocks/ { state = $NF }
END { print state }
If everything is working correctly the ouput will be: "RAID: [UU]". It means that both drives are Up and running.
If there is something wrong with the drive it will give an error message: "RAID: [WARNING!]".
Maybe someone will find this usefull.
Offline
Thanks!
Offline
Thanks!
I have multiple RAIDs so I used the following command to check the status of a specific RAID:
${execi 60 cat /proc/mdstat | grep md126 -A 1 | gawk -f path-to-the-script --}
(replace md126 with the array you want to check)
Offline
Pages: 1