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

Temperature not read for all drives #3

Open
dak180 opened this issue May 28, 2018 · 6 comments · May be fixed by #28
Open

Temperature not read for all drives #3

dak180 opened this issue May 28, 2018 · 6 comments · May be fixed by #28

Comments

@dak180
Copy link

dak180 commented May 28, 2018

It should pull from Temperature_Case or Temperature_Internal (or an average of the two):

########## SMART status report for ada0 drive (Intel 730 and: {serial}) ##########
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)

SMART overall-health self-assessment test result: PASSED

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0032   100   100   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       2189
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       43
170 Available_Reservd_Space 0x0033   100   100   010    Pre-fail  Always       -       0
171 Program_Fail_Count      0x0032   100   100   000    Old_age   Always       -       0
172 Erase_Fail_Count        0x0032   100   100   000    Old_age   Always       -       0
174 Unsafe_Shutdown_Count   0x0032   100   100   000    Old_age   Always       -       39
175 Power_Loss_Cap_Test     0x0033   100   100   010    Pre-fail  Always       -       629 (12 9058)
183 SATA_Downshift_Count    0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0033   100   100   090    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
190 Temperature_Case        0x0022   080   072   000    Old_age   Always       -       20 (Min/Max 18/28)
192 Unsafe_Shutdown_Count   0x0032   100   100   000    Old_age   Always       -       39
194 Temperature_Internal    0x0022   100   100   000    Old_age   Always       -       27
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
225 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       2685
226 Workld_Media_Wear_Indic 0x0032   100   100   000    Old_age   Always       -       0
227 Workld_Host_Reads_Perc  0x0032   100   100   000    Old_age   Always       -       81
228 Workload_Minutes        0x0032   100   100   000    Old_age   Always       -       131164
232 Available_Reservd_Space 0x0033   100   100   010    Pre-fail  Always       -       0
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age   Always       -       0
234 Thermal_Throttle        0x0032   100   100   000    Old_age   Always       -       0/0
241 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       2685
242 Host_Reads_32MiB        0x0032   100   100   000    Old_age   Always       -       15674
@edgarsuit
Copy link
Owner

That looks like it's an SSD. The script's support for SSDs is currently minimal. I've been planning to improve SSD support, but they don't really need the same level of monitoring that platter drives do, so my motivation for it has been low.

If anyone wants to take a stab at it, go for it (and good luck; SMART attributes on SSDs are far from standardized).

@dak180
Copy link
Author

dak180 commented May 29, 2018

The other option is that instead of looking for the name look for the number instead, (194) that does seem to be fairly standard across drives even if the name is not.

@edgarsuit
Copy link
Owner

That would be doable, but you would need some additional logic to make sure the number was in the first column of the table and not, say, in the RAW_VALUE column., Like I said, I'll probably get around to it eventually, but my motivation is low.

@dak180
Copy link
Author

dak180 commented Jun 5, 2018

smartctl -a "/dev/${hdNum}" | grep "^194" | sed -E 's:[[:space:]]+: :g' | cut -d ' ' -f 10

will give you the right value where ${hdNum} is the drive specifier.

@itr6
Copy link

itr6 commented Oct 11, 2018

First off, Thank you so much for this!!!! And I'm not sure if this is the right place to do this but I just wanted to add my voice in saying, I'd love for your amazing script to read SSD's as well. Right now I have a separate script that sends me my status on my Toshiba SAS SSD.

Thanks again for sharing your work!

@dak180
Copy link
Author

dak180 commented May 28, 2019

That would be doable, but you would need some additional logic to make sure the number was in the first column of the table and not, say, in the RAW_VALUE column., Like I said, I'll probably get around to it eventually, but my motivation is low.

$1 ~ /^194/{temp=($10 + 0)} \
Should do it; $1 selects the first column ~ tells awk to use regex and ^ matches from the beginning.
Testing with WD Reds, intel ssds and crucial ssds all worked.

dak180 referenced this issue in dak180/FreeNAS-Report Apr 11, 2021
Ids are standardized (mostly) but names are not.

Fixes #3.
@dak180 dak180 linked a pull request Dec 21, 2022 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.

3 participants