Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD Smart Attributes #21

Open
soleilblanc99 opened this issue Dec 8, 2020 · 0 comments · May be fixed by #28
Open

SSD Smart Attributes #21

soleilblanc99 opened this issue Dec 8, 2020 · 0 comments · May be fixed by #28

Comments

@soleilblanc99
Copy link

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

@dak180 dak180 linked a pull request May 16, 2021 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant