Check HD status

I have some server ( IBM , Dell ) , our data center is not in the same location with office , therefore , I do not know if the HD lamp is flash when the HD is fault , can advise if I can write a script to check if the HD is normal running or not ?

thanks

Hardware fault checking tends to be OS specific. For example on AIX 5.3 you can check for system alerts (amber light) by ensuring the output of /usr/lpp/diagnostics/bin/usysfault is "normal" and send email if it's not.

You could also run the SNMP deamon and check for alert conditions using that.

There are also quite a few commercial status monitoring tools around (Nagios/SolarWinds/Cacti come to mind) that can send SMS/email etc. alerts whenever a number of conditions arrise (eg running out of disk space, high CPU load, system alerts and the like).