Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2016-04-24 00:50:46

  skullman - Użytkownik

skullman
Użytkownik
Zarejestrowany: 2010-04-08

hddtemp i conky

Może to głupie pytanie ale jak zmusić do działania hddtemp w conky na Jessie? Próbowałem tego co już znam plus różne dziwne porady z różnych for i bez skutku, w sumie niedawno na swoim blaszaku stawiałem system od nowa i też nie miałem z tym żadnego problemu a tu walczę i walczę i już zaczynam mieć dość. Niby działa:

Kod:

# systemctl status hddtemp
● hddtemp.service - LSB: disk temperature monitoring daemon
   Loaded: loaded (/etc/init.d/hddtemp)
   Active: active (running) since nie 2016-04-24 00:32:44 CEST; 2min 9s ago
  Process: 509 ExecStart=/etc/init.d/hddtemp start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hddtemp.service
           └─885 /usr/sbin/hddtemp -d -l 127.0.0.1 -p 7634 -s | /dev/sda /dev/sdb

kwi 24 00:32:44 debian-piotrek hddtemp[509]: Starting disk temperature monitoring daemon: hddtemp:  /dev/sda /dev/sdb.

ale wklepanie w konsolę hddtemp /dev/sda działa tylko pod rootem.

Kod:

$ cat /etc/default/hddtemp 
# Defaults for hddtemp initscript (/etc/init.d/hddtemp)
# This is a POSIX shell fragment

# [automatically edited by postinst, do not change line format ]

# hddtemp network daemon switch. If set to true, hddtemp will listen
# for incoming connections.
RUN_DAEMON="true"

# List of devices you want to use with hddtemp. If none specified,
# hddtemp will probe standard devices.
DISKS="/dev/hda"

# List of devices you want to use with hddtemp, but that would not be
# probed for a working sensor.
DISKS_NOPROBE=""

# IP address of the interface on which you want hddtemp to be bound
# on. If none specified, goes to 127.0.0.1. Use 0.0.0.0 to bind hddtemp
# on all interfaces.
INTERFACE="127.0.0.1"

# Port number on which you want hddtemp to listen on. If none specified,
# the port 7634 is used.
PORT="7634"

# Database file to use. If none specified, /etc/hddtemp.db is used.
#DATABASE="/etc/hddtemp.db"

# Separator to use between fields. The default separator is '|'.
#SEPARATOR="|"

# Logging period (in seconds) for the temperatures. If set to a value
# different than 0, hddtemp will run as a daemon periodically logging
# the temperatures through syslog
RUN_SYSLOG="0"

# Other options to pass to hddtemp
OPTIONS=""

Może po prostu nie widzę jakiejś oczywistej pierdoły, sam już nie wiem. Uciekłem się już nawet do bardzo nieeleganckiego rozwiązania i dociągnąłem hddtemp z testinga bo na moim kompie działa na tym samym konfigu conky.

Offline

 

#2  2016-04-24 02:05:20

  drag_op - Użytkownik

drag_op
Użytkownik
Zarejestrowany: 2015-11-09

Re: hddtemp i conky

U mnie w conky wpisane jest tak:

Kod:

${hddtemp /dev/sda}

i działa mimo tego, że w konsoli wywołanie hddtemp /dev/sda prosi o roota. Ale to są dwie inne rzeczy, ponieważ conky korzysta z daemona hddtemp a uruchamianie w konsoli odpala za każdym razem binarke i prosi przez zwykłego użytkownika o dostęp do /dev/sda - dlatego bez roota nie rabatajet.

Ostatnio edytowany przez drag_op (2016-04-24 02:06:49)

Offline

 

#3  2016-04-24 07:17:51

  bass - Użytkownik

bass
Użytkownik
Skąd: Czestochowa
Zarejestrowany: 2013-05-21

Re: hddtemp i conky

A ja mam tak :

Kod:

${goto 30}+${exec sensors | grep 'Core 0'}
${goto 30}+${exec sensors | grep 'Core 1'}

....i dziala

Ostatnio edytowany przez bass (2016-04-24 07:18:14)


5.15.0-3.slh.1-aptosid-amd64 #1 SMP PREEMPT aptosid 5.15-5 (2021-11-19) x86_64 GNU/Linux

Offline

 

#4  2016-04-24 10:57:22

  mati75 - Psuj

mati75
Psuj
Skąd: masz ten towar?
Zarejestrowany: 2010-03-14

Re: hddtemp i conky

Kod:

chmod u+s /usr/sbin/hddtemp

możesz też zrobić dowiązanie symboliczne:

Kod:

ln -s /usr/sbin/hddtemp /usr/bin/hddtemp

https://l0calh0st.pl/obrazki/userbar.png

Offline

 

#5  2016-04-24 12:47:37

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: hddtemp i conky

U mnie działa bez problemu:

Kod:

# systemctl status hddtemp
● hddtemp.service - Hard drive temperature monitor daemon
   Loaded: loaded (/etc/systemd/system/hddtemp.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-04-24 11:51:11 CEST; 52min ago
     Docs: man:hddtemp(8)
 Main PID: 1385 (hddtemp)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/hddtemp.service
           └─1385 /usr/sbin/hddtemp /dev/sda --daemon --foreground --listen=127.0.0.1 --port=7634 --file=/etc/hddtemp.db --separator=| --unit=C -4

Apr 24 11:51:11 morfikownia systemd[1]: Started Hard drive temperature monitor daemon.

Tylko ja sobie zrobiłem natywną usługę dla systemd (/etc/systemd/system/hddtemp.service):

Kod:

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

[Service]
Type=simple
ExecStart=/usr/sbin/hddtemp /dev/sda \
    --daemon \
    --foreground \
    --listen=127.0.0.1 \
    --port=7634 \
    --file=/etc/hddtemp.db \
    --separator=| \
    --unit=C \
    -4

[Install]
WantedBy=multi-user.target

Kod:

# ls -al /usr/{bin,sbin}/hddtemp
ls: cannot access '/usr/bin/hddtemp': No such file or directory
-rwxr-xr-x 1 root root 36K 2012-07-09 08:21:07 /usr/sbin/hddtemp*

I linijka w conky:

Kod:

${color0}sda: ${execi 3600 cat /sys/block/sda/device/model || echo "none"} ${alignr}${hddtemp /dev/sda}˚C

Ostatnio edytowany przez morfik (2016-04-24 12:52:04)

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)