mirror of
https://github.com/byReqz/stocheck.git
synced 2024-11-22 14:41:15 +00:00
accounted for random numbers on lsi
This commit is contained in:
parent
8cc8971bbd
commit
622342d73b
@ -155,9 +155,11 @@ while [ -z "$1" ]; do
|
|||||||
echo "-------------------------------------------"
|
echo "-------------------------------------------"
|
||||||
megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state"
|
megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state"
|
||||||
echo "-------------------------------------------"
|
echo "-------------------------------------------"
|
||||||
for x in {0..32};do
|
scan=$(megacli -pdlist -a0 | grep "Device Id")
|
||||||
scan=$(megacli -pdlist -a0 | grep "Device Id")
|
p1=$(head -n 1 $scan | cut -c 12-)
|
||||||
if [[ -n $(echo $scan | grep $x) ]];then
|
pz=$(tail -n 1 $scan | cut -c 12-)
|
||||||
|
for x in {$p1..$pz};do
|
||||||
|
if [[ -n $(echo $scan | grep -E "$x") ]];then
|
||||||
echo "------------------- p$x --------------------"
|
echo "------------------- p$x --------------------"
|
||||||
smartctl -i -d sat+megaraid,$x /dev/sda | grep -e "=== START OF INFORMATION SECTION ===" -e "Device Model:" -e "Serial Number:" -e "Firmware Version:" -e "User Capacity:" -e "SMART support is:" -e "Sector Size:" -e "Rotation Rate:"
|
smartctl -i -d sat+megaraid,$x /dev/sda | grep -e "=== START OF INFORMATION SECTION ===" -e "Device Model:" -e "Serial Number:" -e "Firmware Version:" -e "User Capacity:" -e "SMART support is:" -e "Sector Size:" -e "Rotation Rate:"
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user