Open dak180 opened 6 years ago
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).
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.
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.
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.
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!
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.
It should pull from
Temperature_Case
orTemperature_Internal
(or an average of the two):