Conky, HDD temperature monitoring with smartctl and Sudo?

Hey, I am trying to integrate HDD temp monitoring on conky, however the hddtemp program isn’t available on SuSE 16.0. Using smartctl however, does return a result:

USER@HOSTNAME:~$ sudo smartctl -A /dev/sdb | awk ‘NR==18’ | cut -c 39-41
42

Its work in terminal but when paste to conky config its doesnt work.

Is there any way to integrate this into conky?

You’re obviously referencing a Reddit post (verbatim) from nine years ago [1] - that was quite a while ago :slight_smile:

I used to use Conky, mostly for visual effects (with NVME drives I use, who cares about temp monitoring ) . I will boot up my old TW machine for the Conky configuration file (last boot well over a year ago).

However, keep in mind (as you admitted), hddtemp is not available (yet?) for Leap 16 :+1:

[1]
https://www.reddit.com/r/linux4noobs/comments/55d2ec/conky_hdd_temperature_monitoring_with_smartctl/

As it turns out, I didn’t configure my Conky to include HDD temp monitoring:

@tobinfrost78 hddtemp is way too old, it doesn’t build even when fixing the patch issue.

Use drivetemp (you likely need to modprobe it) and then disk temperature will be reported via sensors.

Leap 16.0;

modprobe drivetemp

sensors
drivetemp-scsi-0-0
Adapter: SCSI adapter
temp1:        +33.0°C  

smartctl -a /dev/sda | grep Temperature
194 Temperature_Celsius     0x0023   067   067   000    Pre-fail  Always       -       33 (Min/Max 33/33)

I would configure sensors as well for a friendly name, then can grab the info for conky.

Edit Delete request submitted: https://build.opensuse.org/requests/1329737

1 Like

I don’t use hddtemp. Cannot paste result od smarctl to conky. Is showing in console but not in conky widget.

@tobinfrost78 yes as it requires root access. Use drivetemp and sensors, then use exec in you conky config.

For example;
S.M.A.R.T Temperature (sda):${alignr}${exec sensors drivetemp-scsi-1-0 | grep "temp1" | awk -F ' ' '{print $2}'}

1 Like

How to find my 4 drives in my system?

Did you (as root user) modprobe drivetemp? Then run sensors command to see if the devices appear?

Thx man!
i created config like this.

Cannot find temp for other disks but i will try.

Hi, the drivetemp shows in bottom here after modprobing

To make the drivertemp module load, just add a /etc/modules-load.d/01-drivetemp.conffile containing drivetemp or if want in the initrd, add to dracut…