You are not logged in.

#1 2021-07-29 09:07:38

frank1962
Member
Registered: 2021-05-10
Posts: 19

[Solved]hddtemp and conky

I am making my .conkyrc file, an i would use hddtemp for temperature reading of some HD in my system. However hddtemp requires sudo to activate itself. I've read something around but I'm at a full stop. Anyone have any ideas?

Last edited by frank1962 (2021-08-06 17:22:38)

Offline

#2 2021-07-29 09:13:28

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,680

Re: [Solved]hddtemp and conky

If you start the systemd hddtemp.service, then conky should be able to read the drive temperatures without root permissions.

Offline

#3 2021-07-29 15:17:09

frank1962
Member
Registered: 2021-05-10
Posts: 19

Re: [Solved]hddtemp and conky

I started hddtemp.service but, even from the terminal, hddtemp asks me for administrator rights (also for / dev / sda);
if i follow hddtemp wiki, i try with
telnet localhost 7634
but the drive i get is not the one i wanted to get (i need sdb and not sda). I am unable to configure it for another unit

Offline

#4 2021-07-29 15:30:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,368

Online

#5 2021-07-29 16:23:11

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: [Solved]hddtemp and conky


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

#6 2021-08-06 14:31:05

frank1962
Member
Registered: 2021-05-10
Posts: 19

Re: [Solved]hddtemp and conky

in other words I must give the command

systemctl edit hddtemp.service

and appears to me:

### Editing /etc/systemd/system/hddtemp.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file



### Lines below this comment will be discarded

### /usr/lib/systemd/system/hddtemp.service
# [Unit]
# Description=Hard drive temperature monitor daemon
#
# [Service]
# ExecStart=/usr/bin/hddtemp -dF /dev/sda
#
# [Install]
# WantedBy=multi-user.target


I edit the line containing /dev/sda and substituing with /dev/sdb  and removing the asterisk.
I save it, but the file /etc/systemd/system/hddtemp.service.d/override.conf doesn't exist.
what should I do ?

Offline

#7 2021-08-06 14:48:49

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: [Solved]hddtemp and conky

frank1962 wrote:

in other words I must give the command

systemctl edit hddtemp.service

You have to use sudo (or whatever you use) to edit system files

frank1962 wrote:

and appears to me:

### Editing /etc/systemd/system/hddtemp.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file



### Lines below this comment will be discarded

I edit the line containing /dev/sda and substituing with /dev/sdb  and removing the asterisk.
I save it, but the file /etc/systemd/system/hddtemp.service.d/override.conf doesn't exist.
what should I do ?

In that 'Anything between here..' space enter this:

[Service]
ExecStart=
ExecStart=/usr/bin/hddtemp -dF /dev/sdb

Save and close.  Re-load the daemon(s), and restart hddtemp.service.  Then check your status:

hddtemp.service - Hard drive temperature monitor daemon
     Loaded: loaded (/usr/lib/systemd/system/hddtemp.service; enabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/hddtemp.service.d
             └─override.conf


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

#8 2021-08-06 17:21:49

frank1962
Member
Registered: 2021-05-10
Posts: 19

Re: [Solved]hddtemp and conky

of course I use sudo.
In the line

ExecStart=/usr/bin/hddtemp -dF /dev/sdb

I added the -w option for the HD type.

ExecStart=/usr/bin/hddtemp -wdF /dev/sdb

Now telnet works.

Offline

#9 2021-08-06 17:23:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,368

Re: [Solved]hddtemp and conky

That's maybe not the best idea ever - see whether you get an output w/o -w but when (later) waking the HDD by actual usage.

Online

Board footer

Powered by FluxBB