x86: fix cpu temp info

This commit is contained in:
coolsnowwolf 2020-07-07 20:22:05 +08:00
parent b1413474d4
commit 7f73591fbf
2 changed files with 4 additions and 24 deletions

View File

@ -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

View File

@ -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 "