lede/package/lean/autocore/files/sbin/cpuinfo
2020-07-06 16:13:07 +08:00

26 lines
279 B
Bash
Executable File

#!/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