hddtemp daemon未启动导致conky无法启动 » 荒野无灯weblog

Keep It Simple, Stupid.

荒野无灯weblog

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配置如下:

┌─[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"

然后:

sudo systemctl enable hddtemp.service
sudo systemctl start hddtemp.service

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

|/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

Tagged in : hddtemp,conky

All Comments (0)
Gravatar image
No Comments