mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
x86: fix cpu temp info
This commit is contained in:
parent
b1413474d4
commit
7f73591fbf
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=autocore
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=33
|
||||
PKG_RELEASE:=35
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -1,25 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
info()
|
||||
{
|
||||
MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'`
|
||||
#获取CPU工作频率
|
||||
|
||||
sensors 2>/dev/null
|
||||
|
||||
if [ $? -eq 0 ];then
|
||||
a=`sensors | grep 'Core 0' | cut -c10-24`
|
||||
#获取CPU核心1温度
|
||||
|
||||
else
|
||||
a=""
|
||||
fi
|
||||
}
|
||||
|
||||
out()
|
||||
{
|
||||
info
|
||||
echo "$MHz MHz $a "
|
||||
}
|
||||
|
||||
out
|
||||
MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'`
|
||||
TEMP=`sensors 2>/dev/null | grep 'Core 0' | cut -c12-`
|
||||
echo "$MHz MHz $TEMP "
|
||||
|
Loading…
Reference in New Issue
Block a user