Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

conky - hddtemp always displays 50c - stretch - mate

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
q76as8
Posts: 3
Joined: 2018-07-20 08:13

conky - hddtemp always displays 50c - stretch - mate

#1 Post by q76as8 »

My hddtemp line reads:

HDD Temp: ${execi 2 hddtemp /dev/sda | cut -c 31-32}°C

This always displays:

HDD Temp: 50°C

No matter what the temperature actually is.

--------------------------------------------------------------------

When I use the cli, it reads properly:

#hddtemp /dev/sda
/dev/sda: Samsung SSD 850 EVO 500G B �@: 37°C

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: conky - hddtemp always displays 50c - stretch - mate

#2 Post by bw123 »

50 is the 31-32 characters in the output... try 46-47?

Code: Select all

$ echo /dev/sda: Samsung SSD 850 EVO 500G B .�.@: 37°C | cut -c 31-32
50
$ man cut
$ echo /dev/sda: Samsung SSD 850 EVO 500G B .�.@: 37°C | cut -c 46-47
37
resigned by AI ChatGPT

q76as8
Posts: 3
Joined: 2018-07-20 08:13

Re: conky - hddtemp always displays 50c - stretch - mate

#3 Post by q76as8 »

This works in the cli; but the temp field just goes blank in the conky window.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: conky - hddtemp always displays 50c - stretch - mate

#4 Post by Dai_trying »

hdtemp requires root privileges and cannot be run by conky without a tweak, you can allow this package to run for your user if you are using the sudo package by adding the following to your etc/sudoers file, replace the "<your user name>" with your actual user name. You will need to reboot for this to take effect.

Code: Select all

<your user name> ALL = (root) NOPASSWD: /usr/sbin/hddtemp
And change your conky line to

Code: Select all

HDD Temp: ${execi 2 sudo /usr/sbin/hddtemp /dev/sda | cut -c 46-47}°C

Post Reply