diff options
author | Thomas Debesse <dev@illwieckz.net> | 2016-03-25 23:43:24 +0100 |
---|---|---|
committer | Thomas Debesse <dev@illwieckz.net> | 2016-03-25 23:43:24 +0100 |
commit | ad98ca6626265443234bc9be54a8a5aab51883d0 (patch) | |
tree | 92d4df4a605e707376cc736e95cb7c6a3889ce36 | |
parent | e338075ca7992ece8d6a26be3fd59028420ce63a (diff) |
fix cpu_speed reading for fixed speed cpu
-rwxr-xr-x | sysinfo.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -23,7 +23,7 @@ if [ -z "${cpu}" ]; then # fallback cpu=`uname -p` fi -cpu_speed=`cat /proc/cpuinfo | head -n 7 | tail -n 1 | cut -d ":" -f 2 | cut -d "." -f 1 | sed 's/^ *//'` +cpu_speed=`cat /proc/cpuinfo | grep '^cpu MHz' | head -n 1 | cut -f2 -d':' | cut -c2- | cut -f1 -d'.'` cpu_load=` cat /proc/loadavg | cut -d " " -f 1 | sed 's/,//'` # Detect frequency scaler |