summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Debesse <dev@illwieckz.net>2016-03-25 23:43:24 +0100
committerThomas Debesse <dev@illwieckz.net>2016-03-25 23:43:24 +0100
commitad98ca6626265443234bc9be54a8a5aab51883d0 (patch)
tree92d4df4a605e707376cc736e95cb7c6a3889ce36
parente338075ca7992ece8d6a26be3fd59028420ce63a (diff)
fix cpu_speed reading for fixed speed cpu
-rwxr-xr-xsysinfo.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysinfo.sh b/sysinfo.sh
index 563e3f4..d382cfa 100755
--- a/sysinfo.sh
+++ b/sysinfo.sh
@@ -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