Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PVE 8.0 ”配置pve的web界面显示传感器温度、CPU频率“功能异常。 #84

Closed
hsj1992 opened this issue Jul 22, 2023 · 3 comments

Comments

@hsj1992
Copy link

hsj1992 commented Jul 22, 2023

CPU实时频率显示异常:

CPU频率 CPU实时(Cur): undefined MHz | 最小(min): 800.0000 MHz | 最大(max): 2900.0000 MHz

 
Sensors Data:
Packageid0 +46.0°C | Core0 +46.0°C
Core1 +48.0°C | Core2 +48.0°C
Core3 +48.0°C

@homuraLan
Copy link

我加了以后一直loading

@christinkaka
Copy link

christinkaka commented Aug 17, 2023

#85 等大佬合并。。。急的话可以尝试替换一下/usr/bin/s.sh

r=`sensors|grep -E 'Package id 0|fan|Physical id 0|Core'|grep '^[a-zA-Z0-9].[[:print:]]*:.\s*\S*[0-9].\s*[A-Z].' -o|sed 's/:\ */:/g'|sed 's/:/":"/g'|sed 's/^/"/g' |sed 's/$/",/g'|sed 's/\ C\ /C/g'|sed 's/\ V\ /V/g'|sed 's/\ RP/RPM/g'|sed 's/\ //g'|awk 'BEGIN{ORS=""}{print $0}'|sed 's/\,$//g'|sed 's/°C/\&degC/g'`
c=`lscpu|grep MHz|sed 's/CPU\ /CPU-/g'|sed 's/\ MHz/-MHz/g'|sed 's/\ //g'|sed 's/^/"/g'|sed 's/$/"\,/g'|sed 's/\:/\"\:\"/g'|sed 's/(s)scaling//g'|awk 'BEGIN{ORS=""}{print $0}'|sed 's/\,$//g'`
r="{"$r","$c"}"
#获取实际频率
cpufreq=$(echo "scale=4; $(cpufreq-info -f) / 1000" | bc -l)
r=$(echo "$r" | sed 's/"CPU-MHz":"[^"]*"/"CPU-MHz":"'"$cpufreq"'"/')
echo $r

@ivanhao
Copy link
Owner

ivanhao commented Aug 30, 2023

更新最新的版本可解决。

@ivanhao ivanhao closed this as completed Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants