Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hddtemp in Bookworm

1,862 views
Skip to first unread message

Stephen P. Molnar

unread,
Jun 26, 2023, 1:00:06 PM6/26/23
to
I have been testing Bullseye in a VM and haven't encountered any
problems, at least not until now.

It would appear that hddtemp has not been included. If this is the case,
what is an alternate method for monitoring drive temperatures?

Thanks in advance

--
Stephen P. Molnar, PhD
https://insilicochemistry.net
(614)-312-7528
Skype: smolnar1

piorunz

unread,
Jun 26, 2023, 2:10:05 PM6/26/23
to
On 26/06/2023 17:53, Stephen P. Molnar wrote:
> I have been testing Bullseye in a VM and haven't encountered any
> problems, at least not until now.
>
> It would appear that hddtemp has not been included. If this is the case,
> what is an alternate method for monitoring drive temperatures?
>
> Thanks in advance
>
I can recommend smartctl from smartmontools package. It prints out all
SMART data including temperature. I use it to export nicely formatted
summaries like this:

Device Model: ST4000DM000-1F2168 (4096 bytes sector)
Power On: 34332 hours
Power Cycles: 38 (903 hours/cycle)
Temperature: 31 °C
Total Written: 335 TiB (85 TiB/year)

And SSD:
Device Model: CT250MX500SSD1 (4096 bytes sector)
Power On: 27309 hours
Power Cycles: 107 (255 hours/cycle)
Temperature: 36 °C
Unused Reserve NAND Blocks: 28
Lifetime Used: 27%
Average Block-Erase Count: 410
Total Written: 20 TiB (6 TiB/year)

--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀⠀⠀

Gareth Evans

unread,
Jun 26, 2023, 2:20:06 PM6/26/23
to
On Mon 26 Jun 2023, at 17:53, Stephen P. Molnar <s.mo...@sbcglobal.net> wrote:
> I have been testing Bullseye

This contrasts with the subject's mention of Bookworm, so I am assuming you mean Bookworm (that is, Debian 12)

> in a VM and haven't encountered any
> problems, at least not until now.
>

> It would appear that hddtemp has not been included. If this is the case,
> what is an alternate method for monitoring drive temperatures?

$ cat /etc/debian_version
12.0

Using sudo or "su -":

smartctl -a /dev/sda|grep Tem
194 Temperature_Celsius 0x0022 066 039 000 Old_age Always - 34 (Min/Max 11/61)

works, though it doesn't respond normally to "| cut -fx" where x is a field number. Values don't seem to be tab-separated, so some jiggery-pokery may be required if you're recording the output somewhere.

I still have hddtemp installed having upgraded from Buster > Bullseye > Bookworm

$ aptitude why hddtemp
i mate-desktop-environment Suggests mate-desktop-environment-extras (
>= 1.26)
p mate-desktop-environment-extras Recommends mate-sensors-applet (>= 1.26)
p mate-sensors-applet Recommends hddtemp

and indeed:

$ sudo hddtemp /dev/sda
/dev/sda: TOSHIBA THNSNH128GMCT: 35°C

...but this "recommends" presumably won't be available in a fresh Bookworm installation, since

$ apt policy hddtemp
hddtemp:
Installed: 0.3-beta15-54
Candidate: 0.3-beta15-54
Version table:
*** 0.3-beta15-54 100
100 /var/lib/dpkg/status
$

Hope that helps.

Best wishes,
Gareth

piorunz

unread,
Jun 26, 2023, 4:20:05 PM6/26/23
to
On 26/06/2023 19:17, Gareth Evans wrote:
> ...but this "recommends" presumably won't be available in a fresh Bookworm installation, since
>
> $ apt policy hddtemp
> hddtemp:
> Installed: 0.3-beta15-54
> Candidate: 0.3-beta15-54
> Version table:
> *** 0.3-beta15-54 100
> 100 /var/lib/dpkg/status
> $

Exactly. hddtemp is dormant, won't be included in current stable and
future releases:

https://sources.debian.org/src/hddtemp/0.3-beta15-54/debian/NEWS/

Gareth Evans

unread,
Jun 26, 2023, 6:10:05 PM6/26/23
to
On Mon 26 Jun 2023, at 21:13, piorunz <pio...@gmx.com> wrote:
> On 26/06/2023 19:17, Gareth Evans wrote:
>> ...but this "recommends" presumably won't be available in a fresh Bookworm installation, since
>>
>> $ apt policy hddtemp
>> hddtemp:
>> Installed: 0.3-beta15-54
>> Candidate: 0.3-beta15-54
>> Version table:
>> *** 0.3-beta15-54 100
>> 100 /var/lib/dpkg/status
>> $
>
> Exactly. hddtemp is dormant, won't be included in current stable and
> future releases:
>

Is this documented anywhere in relation to the current release?

Your link

> https://sources.debian.org/src/hddtemp/0.3-beta15-54/debian/NEWS/

got me searching for some of its key terms (linux drivetemp hwmon) which led to

https://www.kernel.org/doc/html/latest/hwmon/drivetemp.html

which says:

"[...] This driver supports reporting the temperature of disk and solid state drives with temperature sensors.

If supported, it uses the ATA SCT Command Transport feature to read the current drive temperature and, if available, temperature limits as well as historic minimum and maximum temperatures. If SCT Command Transport is not supported, the driver uses SMART attributes to read the drive temperature.

[...]

Sysfs entries

Only the temp1_input attribute is always available. Other attributes are available only if reported by the drive. All temperatures are reported in milli-degrees Celsius.

---------------------------------------
temp1_input | Current drive temperature
---------------------------------------
[...]"

There are various temp1_input files under /sys/... and it wasn't immediately clear where to look.

After some failed experimentation and a web search, I found

https://unix.stackexchange.com/questions/558112/standard-way-to-check-the-hard-drive-temperature-without-installing-additional-p

which suggests (as adapted for my machine)

$ cat /sys/class/scsi_disk/1:0:0:0/device/hwmon/hwmon3/temp1_input
35000

which matches (at different magnitude)

$ sudo smartctl -a /dev/sda |grep -i tem
194 Temperature_Celsius 0x0022 065 039 000 Old_age Always - 35 (Min/Max 11/61)

...which seems like a lot of effort to discover something that should (shouldn't it?) be documented somewhere in relation to Bookworm? I couldn't find anything in the release notes except some "notable" obsolete packages at s5.3, which didn't include hddtemp.

https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#noteworthy-obsolete-packages

Just out of interest, is there an authoritative list of packages removed per Debian version? The Bookworm release announcement says 'over 6,296 packages have been removed as "obsolete"'

https://www.debian.org/News/2023/20230610

I tried searching with both google and ddg and couldn't find anything authoritative looking.

That seems to invite a lot of detective work :)

Thanks,
Gareth

gene heskett

unread,
Jun 26, 2023, 7:00:05 PM6/26/23
to
On 6/26/23 16:13, piorunz wrote:
> On 26/06/2023 19:17, Gareth Evans wrote:
>> ...but this "recommends" presumably won't be available in a fresh
>> Bookworm installation, since
>>
>> $ apt policy hddtemp
>> hddtemp:
>>    Installed: 0.3-beta15-54
>>    Candidate: 0.3-beta15-54
>>    Version table:
>>   *** 0.3-beta15-54 100
>>          100 /var/lib/dpkg/status
>> $
>
> Exactly. hddtemp is dormant, won't be included in current stable and
> future releases:
>
> https://sources.debian.org/src/hddtemp/0.3-beta15-54/debian/NEWS/
>
Since its quite usefull, is it because its now w/o a maintainer, or has
some other change now broken it and no one has volunteered to fix it??
> --
> With kindest regards, Piotr.
>
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
> ⠈⠳⣄⠀⠀⠀⠀
>
> .

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>

piorunz

unread,
Jun 26, 2023, 7:40:05 PM6/26/23
to
On 26/06/2023 23:01, Gareth Evans wrote:

>> Exactly. hddtemp is dormant, won't be included in current stable and
>> future releases:

> Is this documented anywhere in relation to the current release?

It's been removed from unstable and testing in 2021, and consequently,
missed Bookworm. It's not going back.
I checked upstream, and last release from the author is from 2008! Wow,
Debian was really patiently repackaging this for all those years.

https://arch.savannah.nongnu.org/archives/hddtemp/sources/

https://tracker.debian.org/news/1288696/removed-03-beta15-54-from-unstable/

https://tracker.debian.org/pkg/hddtemp

>
> Your link
>
>> https://sources.debian.org/src/hddtemp/0.3-beta15-54/debian/NEWS/
>
> got me searching for some of its key terms (linux drivetemp hwmon) which led to

I just added this module to my system, then detected with sensors, all
my HDDs are there. Nice. Now, I have two tools other than hddtemp which
do the job (other one being smartctl).

You don't need to manually grind this, just use sensors-detect after you
modprobe drivetemp. My result:

$ sensors
drivetemp-scsi-1-0
Adapter: SCSI adapter
temp1: +28.0°C
(...)
drivetemp-scsi-4-0
Adapter: SCSI adapter
temp1: +29.0°C
(and so on)

Andy Smith

unread,
Jun 27, 2023, 8:00:07 AM6/27/23
to
Hi Gareth,

On Mon, Jun 26, 2023 at 11:01:56PM +0100, Gareth Evans wrote:
> seems like a lot of effort to discover something that should
> (shouldn't it?) be documented somewhere in relation to Bookworm?
> I couldn't find anything in the release notes except some
> "notable" obsolete packages at s5.3, which didn't include hddtemp.

I imagine it's a difference of opinion on what is notable enough
that just mentioning it in the NEWS of the package concerned is
enough vs a mention in the release notes.

If you disagree I recommend submitting a bug against release notes
for bookworm with a proposed text citing alternatives to hddtemp.

I have in the past managed to get things added to release notes
post release in this way.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting

Jörg-Volker Peetz

unread,
Jun 28, 2023, 3:10:06 PM6/28/23
to
The linux kernel has a module for reading the drive temperature called
drivetemp. Therefore, using the package lm-sensors should also show the drive
temperature.

Regards,
Jörg.
0 new messages