I have a script which checks the status of HP Smart Array & then emails me the output.
The script run fine when executed manually but I receive no output when configured in a cron job.
The script is below:
hpacucli ctrl slot=3 show config | mail -s "ARRAY STATUS-`date`" me@mycompanyemail.com
Make sure that the environement variables required are setup from within the script you call. (Cron may not preserve some of the environment variables that you need to run your script).
Also you can put your command line into a single script and call it from crontab.
( Not sure it is correct, but otherwise, you can give a try putting your command line in parenthesis)
will not show a just failed disk; it only shows a bad battery, a failed self-test, and a failed disk at system start.
Safer for continued monitoring is the command
hpacucli controller all show config detail
and look at the Status: lines.
The later versions of hpacucli are named hpssacli