HP ACU CLI Examples
Solution 1:
My favorite example:
This can be run from the shell or within the tool.
hpacucli ctrl all show config
(use hpacucli.exe for Windows)
Or
hpacucli ctrl all show config detail
But, if you have the HP Management Agents installed anyway, you should have realtime monitoring of RAID status pushing back to email alerts or an external monitoring system. Either way, this can generate a point-in-time output/status.
[root@Bootylicious ~]# hpacucli ctrl all show config
Smart Array P410i in Slot 0 (Embedded) (sn: 50123456789ABCDE)
array A (SAS, Unused Space: 0 MB)
logicaldrive 1 (1.6 TB, RAID 1+0, OK)
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600.1 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600.1 GB, OK)
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600.1 GB, OK)
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600.1 GB, OK)
physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 600.1 GB, OK)
physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 600.1 GB, OK)
Solution 2:
I understand you use windows OS on your host. Please find list of useful commands for hpacucli for Linux. You might find some of them useful anyway.
sudo /usr/sbin/hpacucli controller all show status
/usr/sbin/hpacucli ctrl slot=1 pd all show detail|grep -i -P '.*(physicaldrive|Firmware|Status).*'
sudo /usr/sbin/hpacucli ctrl all show
sudo /usr/sbin/hpacucli ctrl slot=5 pd all show
show disk physical info
for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I pd all show; done
show disk logical info
for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I pd all show; done
BBU Controller info
for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I show detail; done
switch on disk ID light
sudo /usr/sbin/hpacucli ctrl slot=4 pd 1E:1:13 modify led=on
some other ...
for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I show; done
sudo /usr/sbin/hpacucli ctrl slot=4 pd 1E:1:13 show
for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I show detail|grep -i -P '.*(physicaldrive|Firmware|Status).*'; done
Solution 3:
There are already existing monitoring scripts that do this (for Nagios for example).
Here is how it would work (adjust controller ID accordingly):
hpacucli.exe ctrl all show
Smart Array XXX in Slot 2 (sn: XXXXXXXXXXXX)
hpacucli.exe controller slot=2 physicaldrive all show status
physicaldrive 1:0 (port 1:id 0, X GB): OK
physicaldrive 1:1 (port 1:id 1, X GB): OK
physicaldrive 1:2 (port 1:id 2, X GB): OK
physicaldrive 1:3 (port 1:id 3, X GB): OK
physicaldrive 1:4 (port 1:id 4, X GB): OK
physicaldrive 1:5 (port 1:id 5, X GB): OK
hpacucli.exe controller slot=2 logicaldrive all show status
logicaldrive 1 (X GB, RAID 5): OK
logicaldrive 2 (X GB, RAID 5): OK