X-OpenWrt/CustomFiles/Depends/cpuinfo_x86

6 lines
347 B
Plaintext
Raw Normal View History

#!/bin/sh
MHz_AVG="$(echo "$(grep 'MHz' /proc/cpuinfo | awk '{Freq_Sum += $4};END {print Freq_Sum}') / $(grep 'processor' /proc/cpuinfo | sort -u | wc -l)" | bc)"
2021-08-06 07:25:39 +00:00
TEMP="$(echo "$(sensors 2>/dev/null | grep Core | awk '{Sum += $3};END {print Sum}') / $(sensors 2>/dev/null | grep Core | wc -l)" | bc)"
echo "$MHz_AVG MHz (CPU: ${TEMP}°C)"
sleep 1