You are not logged in.

#1 2022-08-19 12:39:11

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,646

hddtemp vs. drivetemp in conky

For the Conky friends  big_smile

Recently I was reminded again of my post here about hddtemp and drivetemp because the package hddtemp is removed from bookworm/sid.
I thought the procedure of switching to drivetemp as described by the developer in the apt-listchanges message of  2021-02-02, for you to document.

You don't have to wait until bookworm/sid, because drivetemp greatly simplifies the configuration in the .conkyrc configuration file.

1.
First of all you should know that drivetemp.ko is located in the path
/lib/modules/KERNELVERSION/kernel/drivers/hwmon. If the module is not present on your system, then you still have an older kernel and the procedure is not applicable.

As usual with Linux, you can also find this out in the terminal:

/usr/sbin/modinfo drivetemp
filename: /lib/modules/5.18.16-1-siduction-amd64/kernel/drivers/hwmon/drivetemp.ko
license: GPL
description: Hard drive temperature monitor
author: Guenter Roeck <linus@roeck-us.net>
depends:        
retpoline:      Y
intree:         Y
name: drivetemp
vermagic: 5.18.16-1-siduction-amd64 SMP preempt mod_unload modversions  

2. to apply the module now

sudo mkdir /etc/modules-load.d/

(if the VZ modules-load.d already exists, this step is omitted)

3.

echo drivetemp | sudo tee /etc/modules-load.d/drivetemp.conf

4.
so that the module is always loaded automatically, enter as root in the file /etc/modules
drivetemp
If there are already other modules in this file, please note that each module has a new line!

5. managed
Reboot or load the module with modprobe -a (I recommend reboot).

6.
after reboot the command tells me

for m in /sys/class/hwmon/* ; do echo -n "$m = " ; cat $m/name ; done
/sys/class/hwmon/hwmon0 = acpitz
/sys/class/hwmon/hwmon1 = BAT0
/sys/class/hwmon/hwmon2 = drivetemp
/sys/class/hwmon/hwmon3 = AC
/sys/class/hwmon/hwmon4 = coretemp
/sys/class/hwmon/hwmon5 = thinkpad

where drivetemp is displayed in hwmon.
In the configuration file of Conky you only have to add

${hwmon 2 temp 1}

That's it.

Offline

#2 2022-08-19 13:58:37

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: hddtemp vs. drivetemp in conky

Won't work here.  Do not know why. /etc/modules is correct, as well as /etc/modules-load.d  Rebooted, but no drivetemp when checking /sys/class/hwmon. Something else needed maybe?

  /usr/sbin/modinfo drivetemp
filename:       /lib/modules/5.15.6.1-march/kernel/drivers/hwmon/drivetemp.ko
license:        GPL
description:    Hard drive temperature monitor
author:         Guenter Roeck <linus@roeck-us.net>
depends:        
retpoline:      Y
intree:         Y
name:           drivetemp
vermagic:       5.15.6.1-march SMP preempt mod_unload modversions
sleekmason@ai:~$ for m in /sys/class/hwmon/* ; do echo -n "$m = " ; cat $m/name ; done
/sys/class/hwmon/hwmon0 = nvme
/sys/class/hwmon/hwmon1 = acpitz
/sys/class/hwmon/hwmon2 = BAT0
/sys/class/hwmon/hwmon3 = AC
/sys/class/hwmon/hwmon4 = dell_smm
/sys/class/hwmon/hwmon5 = coretemp
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
drivetemp

Offline

#3 2022-08-19 14:42:01

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,646

Re: hddtemp vs. drivetemp in conky

I assume your nvme drive does not support the drivetemp driver.

Search under /sys/class/hwmon/hwmon0
There is probably the temperature sensor for your drive.   wink

Edit:
Surely you won't get any output:

sudo smartctl -A /dev/sda

but with

sudo smartctl -A /dev/nvme0

   ]:D

Last edited by unklar (2022-08-19 15:01:15)

Offline

#4 2022-08-19 17:07:05

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: hddtemp vs. drivetemp in conky

unklar wrote:

I assume your nvme drive does not support the drivetemp driver.

Search under /sys/class/hwmon/hwmon0
There is probably the temperature sensor for your drive.   wink

Edit:
Surely you won't get any output:

sudo smartctl -A /dev/sda

but with

sudo smartctl -A /dev/nvme0

   ]:D

This is interesting stuff. All new to me.

I did not have smartmontools, so installed that to learn more through smartctl.  Thanks for the info!

Offline

#5 2022-08-20 17:42:57

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,010

Re: hddtemp vs. drivetemp in conky

Works here unklar, thank you.

 20 Aug 22 @ 13:49:11 ~
   $ for m in /sys/class/hwmon/* ; do echo -n "$m = " ; cat $m/name ; done
/sys/class/hwmon/hwmon0 = drivetemp
/sys/class/hwmon/hwmon1 = k10temp
/sys/class/hwmon/hwmon2 = asus
 
 20 Aug 22 @ 13:49:16 ~
   $
${alignc}${color6}WD 1TB Temp: ${color}${hwmon 0 temp 1}°C

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#6 2022-08-21 09:16:03

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,646

Re: hddtemp vs. drivetemp in conky

You're welcome, my friend.   smile

Offline

#7 2023-04-07 14:02:33

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,010

Re: hddtemp vs. drivetemp in conky

Revisited this post and realized I have a whole bunch of conkys that need converting.

Thank you unklar


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#8 2023-04-08 12:11:25

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,646

Re: hddtemp vs. drivetemp in conky

Sector11 wrote:

Revisited this post and realized I have a whole bunch of conkys that need converting.

Thank you unklar

Since you have at least 4 times as many conky's, I recommend, don't do it until you realize while playing around with one of these conky's, there is something wrong
I, as an O.F.C., speak from experience....  SLKhTwf.png

Offline

#9 2023-04-09 04:05:28

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,010

Re: hddtemp vs. drivetemp in conky

I have my "test.conky" I tested it and checked things out with old ways of getting the info.
Seems good so far.  Not going to go through all my conkys.
After all, I need time to eat and drink coffee  smile

CHIMO my friend.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB