Closed PilotSnail closed 4 years ago
opkg install lm-sensors lm-sensors-detect
编辑 /usr/lib/lua/luci/view/admin_status/index.htm
local boardinfo = luci.util.ubus("system", "board") or { }
local unameinfo = nixio.uname() or { }'
加入 'local temperinfo = luci.util.exec("sensors | grep -E 'temp1|temp2|Package|Core' | sed 's/temp2/<br>temp2/g' | sed 's/Package/<br>Package/g' | sed 's/Core/<br>Core/g' ")```
cpuusage = cpu_usage,
cpuinfo = cpu_info,
ethinfo = eth_info,
userinfo = user_info,
uptime = sysinfo.uptime or 0,
localtime = os.date(),
loadavg = sysinfo.load or { 0, 0, 0 },
memory = meminfo,
memcached = mem_cached,
swap = swapinfo,
connmax = conn_max,
conncount = conn_count,
leases = stat.dhcp_leases(),
leases6 = stat.dhcp6_leases(),
wifinets = stat.wifi_networks(),
加入temperinfo = luci.util.exec("sensors | grep -E 'temp1|temp2|Package|Core' | sed 's/temp2/
temp2/g' | sed 's/Package/
Package/g' | sed 's/Core/
Core/g'")
}```
e.innerHTML = progressbar(info.conncount, info.connmax);
加入if (e = document.getElementById('temperatue')) e.innerHTML = String.format( '%s', info.temperinfo );```
加入<tr><td width="33%"><%:Temperatue(°C)%></td><td id="temperatue"><%=temperinfo%>-</td></tr>```
谢谢解答,不过我用了vim命令,报错了
解决了,感谢
反馈bug/问题模板,提建议请删除
1.关于你要提交的问题
Q:是否搜索了issue (使用 "x" 选择)
2. 详细叙述
(1) 具体问题
A:貌似所有AMD的CPU均无法显示工作时温度,请问是否可以通过修改配置文件捕获温度感应器数据呢?
(2) 路由器型号和固件版本
A:HP 705 G2 MINI ELITEDESK AMD PRO A6-8500B R5, 6 Compute Cores 2C+4G : 2 Core 2 Thread OpenWrt R20.4.8 IPv4 5.1[2020] Compiled by eSir / LuCI Master (git-20.117.60969-420c61a)
(3) 详细日志
A: