You are not logged in.

#1 2008-06-08 17:57:36

Morra
Member
Registered: 2008-05-16
Posts: 39

RAID status in Conky

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

#2 2008-08-10 00:42:41

moberry
Member
Registered: 2008-08-08
Posts: 16

Re: RAID status in Conky

Thanks!

Offline

Board footer

Powered by FluxBB