Discussion:
Hddetemp vs hddtemp
(too old to reply)
Markus Robert Kessler
2022-09-17 17:20:51 UTC
Permalink
Hi everyone,

maybe this info is helpful for someone:

With "hddtemp" there's a tool out, capable of monitoring harddisks'
temperature. This may help to prevent them from heat death.

Unfortunately, hddtemp (every version I know of) can only access internal
drives. External ones can not be read. Don't know why.

So, I developed a little workaround and called it hddetemp (e for
external, also). It is now also tested under Raspbian OS.

Here you see the difference:

[542 ***@rpi-inst /]# hddtemp /dev/sda
/dev/sda: Generic External: S.M.A.R.T. not available

[543 ***@rpi-inst /]# hddetemp /dev/sda
/dev/sda: Hitachi HTS545016B9A300: 25 (Min/Max 16/43)°C

If you find this helpful, you can get it from here:

https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp

Best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Marco Moock
2022-09-17 17:58:10 UTC
Permalink
Am Samstag, 17. September 2022, um 17:20:51 Uhr schrieb Markus Robert
Post by Markus Robert Kessler
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Great, but wouldn't it be the best solution to implement your
extensions into hddtemp?
Did you contact the original developer about this?
Markus Robert Kessler
2022-09-17 20:56:13 UTC
Permalink
Post by Marco Moock
Am Samstag, 17. September 2022, um 17:20:51 Uhr schrieb Markus Robert
Post by Markus Robert Kessler
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Great, but wouldn't it be the best solution to implement your extensions
into hddtemp?
Did you contact the original developer about this?
Hi Marco,

implementing this code into hddtemp source would be nice, but looking at

http://download.savannah.nongnu.org/releases/hddtemp/

(official homepage) it seems that hddtemp is no longer maintained.
Updating the drives database is not enough to get ahead here.

Thanks, best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Daniel65
2022-09-18 13:09:24 UTC
Permalink
Post by Markus Robert Kessler
Post by Marco Moock
Am Samstag, 17. September 2022, um 17:20:51 Uhr schrieb Markus Robert
Post by Markus Robert Kessler
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Great, but wouldn't it be the best solution to implement your extensions
into hddtemp?
Did you contact the original developer about this?
Hi Marco,
implementing this code into hddtemp source would be nice, but looking at
http://download.savannah.nongnu.org/releases/hddtemp/
(official homepage) it seems that hddtemp is no longer maintained.
Updating the drives database is not enough to get ahead here.
Thanks, best regards,
Markus
Is Hddtemp just a spinning drive-type tool or is it applicable for Solid
State Drives as well??
--
Daniel
Marco Moock
2022-09-18 13:24:24 UTC
Permalink
Post by Daniel65
Is Hddtemp just a spinning drive-type tool or is it applicable for
Solid State Drives as well??
Why should that matter?
There is a temperature sensor that need to be read out, regardless of
the technology the disk uses.
But according to the other post hddtemp is very old, so it is from a
time where SSD weren't common.
Paul
2022-09-18 17:21:42 UTC
Permalink
Post by Marco Moock
Post by Daniel65
Is Hddtemp just a spinning drive-type tool or is it applicable for
Solid State Drives as well??
Why should that matter?
There is a temperature sensor that need to be read out, regardless of
the technology the disk uses.
But according to the other post hddtemp is very old, so it is from a
time where SSD weren't common.
For reasons that escape pretty well everyone, the SMART table on
legacy HDD and on the new SSD, don't match. You would think there
would be value, having entries with the same name, at their
traditional address. I would guess that is too easy.

Some environment information is pinned out in ACPI tables, such as
CoreTemp from your CPU. One of the improvements in reading the
hardware monitor interface on the SuperIO, was for the BIOS to
wrap some of the information, making it easier for userland applications
to "consume" the information. For example, the scaling resistors on
the voltage measurement section, if you use the ACPI table, the
voltages are already scaled for you. And that saves an unbelievable
amount of labor. In the past, humans used to submit empirically
derived scale resistor info, to the maintainer of MBM5, per motherboard
design. And that sucked as a method. Having the correct values
computed by the BIOS designer, and passed via ACPI table, made
so much more sense.

But not everything in life is that easy. Thus, we're still fiddling
with SMART tables in the year 2022.

I assume NVMe temperature is the same as SATA SSD, but that would
be a rash assumption unless verified. Even an eMMC chip, could have
its temperature information, delivered in some other way. And USB
flash sticks, I've never seen a measured value printed on a screen,
for those.

Paul
Jan Panteltje
2022-09-17 17:57:30 UTC
Permalink
On a sunny day (Sat, 17 Sep 2022 17:20:51 -0000 (UTC)) it happened Markus
Post by Markus Robert Kessler
Hi everyone,
With "hddtemp" there's a tool out, capable of monitoring harddisks'
temperature. This may help to prevent them from heat death.
Unfortunately, hddtemp (every version I know of) can only access internal
drives. External ones can not be read. Don't know why.
So, I developed a little workaround and called it hddetemp (e for
external, also). It is now also tested under Raspbian OS.
/dev/sda: Generic External: S.M.A.R.T. not available
/dev/sda: Hitachi HTS545016B9A300: 25 (Min/Max 16/43)°C
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Best regards,
Markus
There is the main HD info program
hdparm
man hdparm

# hdparm -H /dev/sdb
/dev/sdb:
drive temperature (celsius) is: under -20
drive temperature in range: yes

That is with my external 3 TB Toshiba drive
Not sure 'under -20' makes any sense.

I tried your code, installed 'smartctl':

# hddetemp /dev/sdb
/dev/sdb: TOSHIBA MQ04UBB400: °C

So.. may work for some drives.....
Paul
2022-09-17 20:08:31 UTC
Permalink
Post by Jan Panteltje
On a sunny day (Sat, 17 Sep 2022 17:20:51 -0000 (UTC)) it happened Markus
Post by Markus Robert Kessler
Hi everyone,
With "hddtemp" there's a tool out, capable of monitoring harddisks'
temperature. This may help to prevent them from heat death.
Unfortunately, hddtemp (every version I know of) can only access internal
drives. External ones can not be read. Don't know why.
So, I developed a little workaround and called it hddetemp (e for
external, also). It is now also tested under Raspbian OS.
/dev/sda: Generic External: S.M.A.R.T. not available
/dev/sda: Hitachi HTS545016B9A300: 25 (Min/Max 16/43)°C
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Best regards,
Markus
There is the main HD info program
hdparm
man hdparm
# hdparm -H /dev/sdb
drive temperature (celsius) is: under -20
drive temperature in range: yes
That is with my external 3 TB Toshiba drive
Not sure 'under -20' makes any sense.
# hddetemp /dev/sdb
/dev/sdb: TOSHIBA MQ04UBB400: °C
So.. may work for some drives.....
smartctl of smartmontools, knows the temperature.
It looks at location 190 and 194, depending on drive type.
Some devices will require smart passthru, to gain access.

suso smartctl --all /dev/sda | grep -i temperature # basic idea, remove the grep and review by hand

And gnome-disks seems to as well, got both drives (local sata, USB SSD),
It would be interesting to see what cluster of utilities gnome-disks uses.
This is my go-to tool for daily usage.

inxi -F seems a bit lame in the temperature department, getting one of two drives.

The hardware has all sorts of quirks, so this is a topic
for individuals with the time to spend on it.

Paul
Markus Robert Kessler
2022-09-17 21:06:44 UTC
Permalink
Post by Jan Panteltje
On a sunny day (Sat, 17 Sep 2022 17:20:51 -0000 (UTC)) it happened
Post by Markus Robert Kessler
Hi everyone,
With "hddtemp" there's a tool out, capable of monitoring harddisks'
temperature. This may help to prevent them from heat death.
Unfortunately, hddtemp (every version I know of) can only access
internal drives. External ones can not be read. Don't know why.
So, I developed a little workaround and called it hddetemp (e for
external, also). It is now also tested under Raspbian OS.
S.M.A.R.T. not available
HTS545016B9A300: 25 (Min/Max 16/43)°C
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Best regards,
Markus
There is the main HD info program hdparm man hdparm
yes
That is with my external 3 TB Toshiba drive Not sure 'under -20' makes
any sense.
# hddetemp /dev/sdb /dev/sdb: TOSHIBA MQ04UBB400: °C
So.. may work for some drives.....
Hi Jan,

could you please paste smartctl's output for your drive,
section "Vendor Specific SMART Attributes with Thresholds:",
like

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE
UPDATED WHEN_FAILED RAW_VALUE
[...]
190 Airflow_Temperature_Cel 0x0032 068 049 000 Old_age
Always - 32
[...]

Thanks!

Best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Marco Moock
2022-09-19 04:58:03 UTC
Permalink
Am Sat, 17 Sep 2022 17:20:51 -0000 (UTC)
Are there any plans to provide deb packages and/or include this
software in the official repositories of Debian/Ubuntu?

Then more people will likely use it.
William Unruh
2022-09-21 13:53:07 UTC
Permalink
Tried it on a system with and external drive inside a usb converter, and
the systemctl command simply hangs. ^C cannot free it, but
sudo killall hddetemp
did kill it.
Post by Markus Robert Kessler
Hi everyone,
With "hddtemp" there's a tool out, capable of monitoring harddisks'
temperature. This may help to prevent them from heat death.
Unfortunately, hddtemp (every version I know of) can only access internal
drives. External ones can not be read. Don't know why.
So, I developed a little workaround and called it hddetemp (e for
external, also). It is now also tested under Raspbian OS.
/dev/sda: Generic External: S.M.A.R.T. not available
/dev/sda: Hitachi HTS545016B9A300: 25 (Min/Max 16/43)°C
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Best regards,
Markus
Markus Robert Kessler
2022-09-29 12:30:47 UTC
Permalink
On Wed, 21 Sep 2022 13:53:07 +0000 William Unruh wrote:

If you look into the source, you see that hddetemp has nothing to do with
systemctl. It relies on smartctl. If this hangs, then something is wrong
with your hardware.
Post by William Unruh
Tried it on a system with and external drive inside a usb converter, and
the systemctl command simply hangs. ^C cannot free it, but sudo killall
hddetemp did kill it.
Post by Markus Robert Kessler
Hi everyone,
With "hddtemp" there's a tool out, capable of monitoring harddisks'
temperature. This may help to prevent them from heat death.
Unfortunately, hddtemp (every version I know of) can only access
internal drives. External ones can not be read. Don't know why.
So, I developed a little workaround and called it hddetemp (e for
external, also). It is now also tested under Raspbian OS.
S.M.A.R.T. not available
HTS545016B9A300: 25 (Min/Max 16/43)°C
https://www.dipl-ing-kessler.de/developer/freigabe/hddetemp
Best regards,
Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Loading...