Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hddtemp fails to start - systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
vascool
n00b
n00b


Joined: 27 Mar 2016
Posts: 3

PostPosted: Tue Mar 29, 2016 12:00 pm    Post subject: hddtemp fails to start - systemd Reply with quote

Sometimes hddtemp would start successfully at boot time but other times not so.
When hddtemp daemon fails to start a boot time, it also fails to restart after issuing systemctl restart hddtemp several times.
Code:

● hddtemp.service - Hard drive temperature monitor daemon
   Loaded: loaded (/usr/lib64/systemd/system/hddtemp.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/hddtemp.service.d
           └─00gentoo.conf
   Active: inactive (dead) since Ter 2016-03-29 10:40:34 AZOST; 1h 10min ago
     Docs: man:hddtemp(8)
  Process: 2978 ExecStart=/usr/sbin/hddtemp -d --listen=127.0.0.1 $HDDTEMP_DRIVES (code=exited, status=0/SUCCESS)
 Main PID: 2979 (code=exited, status=0/SUCCESS)

Mar 29 10:40:34 roxane systemd[1]: Stopped Hard drive temperature monitor daemon.
Mar 29 10:40:34 roxane systemd[1]: Starting Hard drive temperature monitor daemon...
Mar 29 10:40:34 roxane systemd[1]: Started Hard drive temperature monitor daemon.

I have tried to find more about by this issue, but couldn't find anything related.
Is someone else experiencing this same issue?
I suspect this is systemd related, since I can run hddtemp daemon from a shell just fine.
Back to top
View user's profile Send private message
Tatsh
Apprentice
Apprentice


Joined: 22 Jul 2007
Posts: 187

PostPosted: Mon Apr 04, 2016 7:26 am    Post subject: Reply with quote

I have the same problem. I tried making my own version of the service with no luck. Haven't really tried using hddtemp with systemd since (and this was possibly up to a year ago).
Back to top
View user's profile Send private message
vascool
n00b
n00b


Joined: 27 Mar 2016
Posts: 3

PostPosted: Fri Jun 03, 2016 9:15 am    Post subject: ouputs Reply with quote

After successfully restart hddtemp, systemctl status -l hddtemp outputs
Code:

● hddtemp.service - Hard drive temperature monitor daemon
   Loaded: loaded (/usr/lib64/systemd/system/hddtemp.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/hddtemp.service.d
           └─00gentoo.conf
   Active: active (running) since Sex 2016-06-03 08:21:19 AZOST; 52min ago
     Docs: man:hddtemp(8)
  Process: 3836 ExecStart=/usr/sbin/hddtemp -d --listen=127.0.0.1 $HDDTEMP_DRIVES (code=exited, status=0/SUCCESS)
 Main PID: 3768 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hddtemp.service
           └─3838 /usr/sbin/hddtemp -d --listen=127.0.0.1 /dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6JDWSC01351

Jun 03 08:21:19 roxane systemd[1]: Starting Hard drive temperature monitor daemon...
Jun 03 08:21:19 roxane systemd[1]: Started Hard drive temperature monitor daemon.


/etc/systemd/system/hddtemp.service.d/00gentoo.conf
Code:

# Set a list of drives to check
[Service]
Environment="HDDTEMP_DRIVES=/dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6JDWSC01351"
Back to top
View user's profile Send private message
dottore
n00b
n00b


Joined: 07 Aug 2006
Posts: 27
Location: Southern Germany

PostPosted: Mon Apr 17, 2017 9:49 am    Post subject: Reply with quote

The topic is quite old already. But I have the same problem. Since no resultion is given I suspect the problem is still open?!
Back to top
View user's profile Send private message
dottore
n00b
n00b


Joined: 07 Aug 2006
Posts: 27
Location: Southern Germany

PostPosted: Wed May 03, 2017 6:18 pm    Post subject: Reply with quote

I found a solution which works (at least for me).
I just appended an ampersand after the command to start hddtemp:

Code:
ExecStart=/usr/sbin/hddtemp -d --listen=127.0.0.1 $HDDTEMP_DRIVES &

Since this change the daemon is started successfully every time.

HTH
Back to top
View user's profile Send private message
andreas155
n00b
n00b


Joined: 18 Jul 2021
Posts: 1

PostPosted: Sun Jul 18, 2021 6:40 pm    Post subject: Reply with quote

remove /etc/systemd/system/hddtemp.service.d/00gentoo.conf

systemctl edit hddtemp --full

add RemainAfterExit=yes to [Service]
remove $HDDTEMP_DRIVES and add hdds

[Unit]
Description=Hard drive temperature monitor daemon
Documentation=man:hddtemp(8)

[Service]
Type=forking
RemainAfterExit=yes
ExecStart=/usr/sbin/hddtemp -d /dev/sda /dev/sdb /dev/sdc /dev/sdd

[Install]
WantedBy=multi-user.target
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum