-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Hi,
I had started to work on the original version of the script to simplify it and worked on finding the smart attributes for SSDs.
Here are what I have
ssd_serial_num[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/Serial Number:/{print $3}') ssd_temp[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/194 Temperature_Celsius/{print $10}') ssd_poweron[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/9 Power_On_Hours/{print $10}') ssd_raw_read_err_rate[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/1 Raw_Read_Error_Rate/{print $10}') ssd_powercycle[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/12 Power_Cycle_Count/{print $10}') ssd_prog_fail_count[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/181 Program_Fail_Cnt_Total/{print $10}') ssd_erase_fail_count[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/182 Erase_Fail_Count_Total/{print $10}') ssd_uncorrec_errors[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/187 Reported_Uncorrect/{print $10}') ssd_lifetime_wr[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/241 Lifetime_Writes_GiB/{print $10}') ssd_lifetime_rd[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/242 Lifetime_Reads_GiB/{print $10}') ssd_realloc_event[$index3]=$(smartctl -A -i -v 7,hex48 /dev/$ssd | awk '/196 Not_In_Use/{print $10}') ssd_last_Test_Hours[$index3]=$(smartctl -l selftest /dev/"$ssd" | grep "# 1" | awk '{print $9}')
The current script is more complex than I want to take time understanding but i can test updates.
I also created a $ssd variable to put SSD data in instead of trying to mix-match extracted attributes between rust and ssd. I found conflicts when only using text for attributes hence the reason you have the number in front.
Hope this help!
Jonathan