hddtemp daemon未启动导致conky无法启动

以调试模式启动conky:
┌─[admin@HuangYe] - [/etc/conf.d] - [Mon Dec 03, 02:21]
└─[$] <> conky -D
DEBUG(0) [conky.c:5338]: reading contents from config file '/home/admin/.conkyrc'
Conky: desktop window (1600003) is subwindow of root window (14f)
DEBUG(0) [x11.c:240]: Found ARGB Visual
Conky: window type - normal
Conky: drawing to created window (0x3400002)
Conky: drawing to double buffer
DEBUG(0) [hddtemp.c:81]: free_hddtemp_info() called

到这里便阻塞了。
我这才想到,卸载 sysvinit时被删除的rc.local里是有一条启动 hddtemp的命令的。
于是修改 /dev/conf.d/hddtemp .我的hddtemp daemon配置如下:

1
2
3
4
┌─[admin@HuangYe] - [/etc/conf.d] - [Mon Dec 03, 02:30]
└─[$] <> cat hddtemp
PARAMS="-q -4 -l 127.0.0.1"
DRIVES="/dev/sda /dev/sdb"

然后:

1
2
sudo systemctl enable hddtemp.service
sudo systemctl start hddtemp.service

打开 http://localhost:7634/ 看看,正常显示:

1
|/dev/sda|Hitachi HTS723225L9A360|35|C||/dev/sdb|WDC WD5000BPKT-00PK4T0|28|C|

再次以debug模式启动conky:
conky -D
DEBUG(0) [hddtemp.c:81]: free_hddtemp_info() called
DEBUG(0) [hddtemp.c:92]: add_hddtemp_info(/dev/sda, 35, C) being called
DEBUG(0) [hddtemp.c:92]: add_hddtemp_info(/dev/sdb, 29, C) being called
DEBUG(0) [hddtemp.c:81]: free_hddtemp_info() called
DEBUG(0) [hddtemp.c:92]: add_hddtemp_info(/dev/sda, 35, C) being called
DEBUG(0) [hddtemp.c:92]: add_hddtemp_info(/dev/sdb, 29, C) being called

这下OK了。

参考文档:conky 变量 http://conky.sourceforge.net/variables.html

更多
4 Responses Post a comment
  1. 苏理

    可以尝试一下把arch装在草莓派上。

  2. Pnnk

    额...这个程序是你自己的!!! !!!

  3. 猫扑吧

    学习,没有看懂的, 路过,纯支持。

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS