Discussion:
No interaction between hddtemp and smart?
(too old to reply)
Markus Robert Kessler
2022-09-05 10:27:40 UTC
Permalink
Hi everyone,

hope this is a known issue:

I am doing some testing with a Samsung EVO 870 drive. Since this one was
not in the smart database, so I made an update:

update-smart-drivedb

After that, I can see the temperature of the drive:

$ smartctl --all /dev/sdb | grep ^190
190 Airflow_Temperature_Cel 0x0032 072 045 000 Old_age
Always - 28

From what I have undestood, hddtemp is relying on the values received by
smart. So, I'd expect, that hddtemp now also works. If the drive is not
yet known to hddtemp, at least the field names should be displayable in
debug mode. But this seems not the case here:

$ hddtemp /dev/sdb
/dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not available

$ hddtemp --debug /dev/sdb

================= hddtemp 0.3-beta15 ==================
Model: Samsung SSD 870 EVO 250G


If one of the field value seems to match the temperature, be sure to read
the hddtemp man page before sending a report (section REPORT). Thanks.


Strange.

Any idea?

Thanks,
best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Markus Robert Kessler
2022-09-05 14:50:53 UTC
Permalink
Post by Markus Robert Kessler
Hi everyone,
I am doing some testing with a Samsung EVO 870 drive. Since this one was
update-smart-drivedb
$ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel 0x0032
072 045 000 Old_age Always - 28
From what I have undestood, hddtemp is relying on the values received by
smart. So, I'd expect, that hddtemp now also works. If the drive is not
yet known to hddtemp, at least the field names should be displayable in
$ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
available
$ hddtemp --debug /dev/sdb
================= hddtemp 0.3-beta15 ==================
Model: Samsung SSD 870 EVO 250G
If one of the field value seems to match the temperature, be sure to
read the hddtemp man page before sending a report (section REPORT).
Thanks.
Strange.
Any idea?
Thanks,
best regards,
Markus
Forgot to mention:
The drive is connected via USB-to-SATA (2 different ones tested).

Well, the Smart-values are accessible, so hddtemp should be able to
extract and display the right one. No clue what's wrong here.

Best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Markus Robert Kessler
2022-09-05 16:59:14 UTC
Permalink
Post by Markus Robert Kessler
Post by Markus Robert Kessler
Hi everyone,
I am doing some testing with a Samsung EVO 870 drive. Since this one
update-smart-drivedb
$ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel 0x0032
072 045 000 Old_age Always - 28
From what I have undestood, hddtemp is relying on the values received
by smart. So, I'd expect, that hddtemp now also works. If the drive is
not yet known to hddtemp, at least the field names should be
$ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
available
$ hddtemp --debug /dev/sdb
================= hddtemp 0.3-beta15 ==================
Model: Samsung SSD 870 EVO 250G
If one of the field value seems to match the temperature, be sure to
read the hddtemp man page before sending a report (section REPORT).
Thanks.
Strange.
Any idea?
Thanks,
best regards,
Markus
The drive is connected via USB-to-SATA (2 different ones tested).
Well, the Smart-values are accessible, so hddtemp should be able to
extract and display the right one. No clue what's wrong here.
Best regards,
Markus
Looks as if hddtemp does NOT use the values given by smartctl, but
instead it seems that hddtem is using own -- buggy -- routines.

So, as a workaround, for external drives I recommend using this sudo-
based script:

/bin/hddetemp (root:root, 0755):

######################################################################

#!/bin/bash

for DRIVE in /dev/sd[a-z] ; do

SMARTVALUES=`sudo /sbin/smartctl --all $DRIVE`

if [ "$?" != "0" ] ; then

echo "$DRIVE: ERROR"

else

MODEL_NAME=`echo "$SMARTVALUES" | grep '^Device Model:' |
sed -e 's/^Device Model: *//'`

AIRFLOW_TEMP=`echo "$SMARTVALUES" | grep
'Airflow_Temperature_Cel' | grep -o '[0-9]*$'`

echo "$DRIVE: $MODEL_NAME: $AIRFLOW_TEMP°C"

fi

done

######################################################################
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Paul
2022-09-05 17:31:58 UTC
Permalink
Post by Markus Robert Kessler
Post by Markus Robert Kessler
Post by Markus Robert Kessler
Hi everyone,
I am doing some testing with a Samsung EVO 870 drive. Since this one
update-smart-drivedb
$ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel 0x0032
072 045 000 Old_age Always - 28
From what I have undestood, hddtemp is relying on the values received
by smart. So, I'd expect, that hddtemp now also works. If the drive is
not yet known to hddtemp, at least the field names should be
$ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
available
$ hddtemp --debug /dev/sdb
================= hddtemp 0.3-beta15 ==================
Model: Samsung SSD 870 EVO 250G
If one of the field value seems to match the temperature, be sure to
read the hddtemp man page before sending a report (section REPORT).
Thanks.
Strange.
Any idea?
Thanks,
best regards,
Markus
The drive is connected via USB-to-SATA (2 different ones tested).
Well, the Smart-values are accessible, so hddtemp should be able to
extract and display the right one. No clue what's wrong here.
Best regards,
Markus
Looks as if hddtemp does NOT use the values given by smartctl, but
instead it seems that hddtem is using own -- buggy -- routines.
So, as a workaround, for external drives I recommend using this sudo-
######################################################################
#!/bin/bash
for DRIVE in /dev/sd[a-z] ; do
SMARTVALUES=`sudo /sbin/smartctl --all $DRIVE`
if [ "$?" != "0" ] ; then
echo "$DRIVE: ERROR"
else
MODEL_NAME=`echo "$SMARTVALUES" | grep '^Device Model:' |
sed -e 's/^Device Model: *//'`
AIRFLOW_TEMP=`echo "$SMARTVALUES" | grep
'Airflow_Temperature_Cel' | grep -o '[0-9]*$'`
echo "$DRIVE: $MODEL_NAME: $AIRFLOW_TEMP°C"
fi
done
######################################################################
Does "hddtemp" need sudo ?

https://wiki.archlinux.org/title/Hddtemp

Usage

Hddtemp requires root privileges [formatted as persistent device path]

sudo hddtemp /dev/disk/by-id/wwn-0x60015ee0000b237f

Daemon

Running the daemon allows access to the temperature information via
TCP/IP as a regular user. This is useful for scripts and system monitors.

The daemon is controlled by hddtemp.service

"hddtemp S.M.A.R.T. not available" likely means /dev/sdb was not
accessible without root privilege.

Paul
Markus Robert Kessler
2022-09-05 17:41:51 UTC
Permalink
Post by Paul
Post by Markus Robert Kessler
Post by Markus Robert Kessler
Post by Markus Robert Kessler
Hi everyone,
I am doing some testing with a Samsung EVO 870 drive. Since this one
update-smart-drivedb
$ smartctl --all /dev/sdb | grep ^190 190 Airflow_Temperature_Cel 0x0032
072 045 000 Old_age Always - 28
From what I have undestood, hddtemp is relying on the values received
by smart. So, I'd expect, that hddtemp now also works. If the drive
is not yet known to hddtemp, at least the field names should be
$ hddtemp /dev/sdb /dev/sdb: Samsung SSD 870 EVO 250G: S.M.A.R.T. not
available
$ hddtemp --debug /dev/sdb
================= hddtemp 0.3-beta15 ==================
Model: Samsung SSD 870 EVO 250G
If one of the field value seems to match the temperature, be sure to
read the hddtemp man page before sending a report (section REPORT).
Thanks.
Strange.
Any idea?
Thanks,
best regards,
Markus
The drive is connected via USB-to-SATA (2 different ones tested).
Well, the Smart-values are accessible, so hddtemp should be able to
extract and display the right one. No clue what's wrong here.
Best regards,
Markus
Looks as if hddtemp does NOT use the values given by smartctl, but
instead it seems that hddtem is using own -- buggy -- routines.
So, as a workaround, for external drives I recommend using this sudo-
######################################################################
#!/bin/bash
for DRIVE in /dev/sd[a-z] ; do
SMARTVALUES=`sudo /sbin/smartctl --all $DRIVE`
if [ "$?" != "0" ] ; then
echo "$DRIVE: ERROR"
else
MODEL_NAME=`echo "$SMARTVALUES" | grep '^Device
Model:' |
sed -e 's/^Device Model: *//'`
AIRFLOW_TEMP=`echo "$SMARTVALUES" | grep
'Airflow_Temperature_Cel' | grep -o '[0-9]*$'`
echo "$DRIVE: $MODEL_NAME: $AIRFLOW_TEMP°C"
fi
done
######################################################################
Does "hddtemp" need sudo ?
Yes, and even worse: In most distros root is granted to hddtemp via
"policy kit", which is very infamous due to the evil bug recently.

But anyway, hddtemp works for internal drives and fails for external ones.

Thanks for asking!

Best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
David W. Hodgins
2022-09-05 17:15:21 UTC
Permalink
Post by Markus Robert Kessler
Well, the Smart-values are accessible, so hddtemp should be able to
extract and display the right one. No clue what's wrong here.
Did you restart hddtemp.service after updating the smart db?

Regards, Dave Hodgins
Markus Robert Kessler
2022-09-05 17:36:07 UTC
Permalink
On Mon, 05 Sep 2022 10:50:53 -0400, Markus Robert Kessler
Post by Markus Robert Kessler
Well, the Smart-values are accessible, so hddtemp should be able to
extract and display the right one. No clue what's wrong here.
Did you restart hddtemp.service after updating the smart db?
Regards, Dave Hodgins
Hi Dave,

firstly, I invoked /sbin/smartctl directly without starting it as a
deamon. So, the values were up to date.

And, when running as "hddtemp -d" after machine restart the same occurs:

ncat localhost 7634 results in
|/dev/sdb|Samsung SSD 870 EVO 250G|NOS|*|

Best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Loading...