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)


4.14.0-14.slh.1-aptosid-686 #1 SMP PREEMPT aptosid 4.14-23 (2018-01-22) i686 GNU/Linux

Offline

 

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

  mati75 - Psuj

mati75
Psuj
Skąd: default city
Zarejestrowany: 2010-03-14
Serwis

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

[img]https://l0calh0st.pl/obrazki/userbar.png[/img]

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 ;-)

[ Generated in 0.011 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00013 SET CHARSET latin2
0.00009 SET NAMES latin2
0.00190 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.145.15.205' WHERE u.id=1
0.00143 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.145.15.205', 1714427004)
0.00024 SELECT * FROM punbb_online WHERE logged<1714426704
0.00112 SELECT topic_id FROM punbb_posts WHERE id=300925
0.00099 SELECT id FROM punbb_posts WHERE topic_id=28561 ORDER BY posted
0.00096 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=28561 AND t.moved_to IS NULL
0.00007 SELECT search_for, replace_with FROM punbb_censoring
0.00100 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=28561 ORDER BY p.id LIMIT 0,25
0.00098 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=28561
Total query time: 0.00891 s