亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区
Chinaunix
標(biāo)題:
[原創(chuàng)]為ION3窗口管理器的狀態(tài)欄添加CPU溫度監(jiān)測(cè)。
[打印本頁(yè)]
作者:
doctorjxd
時(shí)間:
2007-11-13 20:15
標(biāo)題:
[原創(chuàng)]為ION3窗口管理器的狀態(tài)欄添加CPU溫度監(jiān)測(cè)。
我的主板不支持smb(4),所以 sysctl -a | grep thermal 時(shí)CPU溫度不能正確顯示。 但是安裝了/usr/ports/sysutils/mbmon后,可以通過(guò)ISA-IO方式讀取CPU溫度。
所以,編譯安裝mbmon時(shí),去掉smb支持。使用 mbmon -I 看CPU溫度。
要在ION3的狀態(tài)欄中顯示CPU溫度,可按照如下操作:
1. 在~/.ion3/目錄下建立文件statusd_mbmon.lua
statusd.inform("mbmon_template", "00.0")
local function inform_mbmon(mbmon)
statusd.inform("mbmon", mbmon)
if tonumber(mbmon)>50 then
statusd.inform("mbmon_hint", "critical")
else
statusd.inform("mbmon_hint", "normal")
end
end
local mbmon_timer=statusd.create_timer()
local function update_mbmon()
local mbmon = io.popen("mbmon -I -c 1 | sed -n '/^Temp/{s/^Temp.= [0-9,.]*, //;s/,.*$//;p;q;}'"):read();
inform_mbmon(mbmon)
mbmon_timer:set(5000, update_mbmon)
end
update_mbmon()
復(fù)制代碼
2.然后修改cfg_statusbar.lua中的template為
template="[ %date || Load:% %>load || CPU Temperature: %mbmon`C ] %filler%systray",
復(fù)制代碼
3. 退出X,重新startx就可以了。
[
本帖最后由 doctorjxd 于 2007-11-13 20:20 編輯
]
歡迎光臨 Chinaunix (http://www.72891.cn/)
Powered by Discuz! X3.2