coolsnowwolf / lede

Lean's LEDE source
Other
29.57k stars 19.51k forks source link

如何让luci概况显示AMD系CPU温度 #4493

Closed PilotSnail closed 4 years ago

PilotSnail commented 4 years ago

反馈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:

guyezi commented 4 years ago

opkg install lm-sensors lm-sensors-detect

编辑 /usr/lib/lua/luci/view/admin_status/index.htm

加入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'") }```

加入if (e = document.getElementById('temperatue')) e.innerHTML = String.format( '%s', info.temperinfo );```

PilotSnail commented 4 years ago

谢谢解答,不过我用了vim命令,报错了 捕获

PilotSnail commented 4 years ago

解决了,感谢 2