CPU [Linux]: Add fallback speed method for PowerPC systems.

This commit is contained in:
Muhammad Herdiansyah 2017-07-14 02:36:07 +07:00
parent 2e1c942491
commit 91372f1cde
2 changed files with 3 additions and 1 deletions

View file

@ -19,6 +19,7 @@
**CPU**
- [Linux] Fixed inaccurate output on ARM SoC devices.
- [Linux] Fixed CPU speed not appearing on PowerPC systems.
- [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors)
- Fixed inaccurate speed output in systems with CPU speed less than 1 GHz.

View file

@ -859,7 +859,8 @@ get_cpu() {
speed="$((speed / 1000))"
else
speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)"
speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' /proc/cpuinfo)"
speed="${speed/MHz}"
fi
# Get CPU temp.