1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-11-25 23:34:54 +00:00

(hopefully) fixed lsi controller counting

This commit is contained in:
Nils 2021-02-08 14:03:00 +00:00 committed by GitHub
parent 2e16e52b98
commit f489fb4f91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,16 +155,16 @@ 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 {a..z};do for x in {0..32};do
scan=$(smartctl --scan) scan=$(megacli -pdlist -a0 | grep "Device Id")
if [[ -n $(echo $scan | grep /dev/sd$x) ]];then if [[ -n $(echo $scan | grep $x) ]];then
echo "------------------- /dev/sd$x --------------------" echo "------------------- p$x --------------------"
smartctl -i -d sat+megaraid,4 /dev/sd$x | 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 ""
echo "=== START OF SELF-ASSESSMENT TEST RESULT ===" echo "=== START OF SELF-ASSESSMENT TEST RESULT ==="
smartctl -H -d sat+megaraid,4 /dev/sd$x | grep -e "SMART overall-health self-assessment test result:" smartctl -H -d sat+megaraid,$x /dev/sda | grep -e "SMART overall-health self-assessment test result:"
echo "" echo ""
smartctl -A -d sat+megaraid,4 /dev/sd$x | grep -e "=== START OF READ SMART DATA SECTION ===" -e "SMART overall-health self-assessment test result:" -e "Reallocated_Sector_Ct" -e "Power_On_Hours" -e "Temperature_Celsius" -e "Media_Wearout_Indicator" -e "Power_Cycle_Count" -e "Reported_Uncorrect" smartctl -A -d sat+megaraid,$x /dev/sda | grep -e "=== START OF READ SMART DATA SECTION ===" -e "SMART overall-health self-assessment test result:" -e "Reallocated_Sector_Ct" -e "Power_On_Hours" -e "Temperature_Celsius" -e "Media_Wearout_Indicator" -e "Power_Cycle_Count" -e "Reported_Uncorrect"
echo "-------------------------------------------------" echo "-------------------------------------------------"
else else
exit exit