22 lines
759 B
Bash
Executable File
22 lines
759 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
|
|
for c in $(/opt/lsi/perccli64/perccli64 show | grep PERC | cut -d' ' -f 3); do
|
|
echo -e "\n- Controller #${c}"
|
|
for e in $(/opt/lsi/perccli64/perccli64 /c${c} show | grep " OK" | cut -d' ' -f 2); do
|
|
echo " - Enclosure #${e}"
|
|
for s in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24; do
|
|
info=$(/opt/lsi/perccli64/perccli64 /c${c}/e${e}/s${s} show all)
|
|
if [ "$(echo "${info}" | grep "Drive not found")" == "" ]; then
|
|
sn=$(echo "${info}" | grep "SN =" | cut -d'=' -f 2 | sed 's/ //g')
|
|
model=$(echo "${info}" | grep "Model Number" | cut -d'=' -f 2)
|
|
temp=$(echo "${info}" | grep Temperature | cut -d'=' -f 2)
|
|
echo " - Slot #${s} - ${model} (SN:${sn}) ${temp}"
|
|
fi
|
|
done
|
|
done
|
|
done
|
|
|
|
|
|
exit 0
|