From ad98ca6626265443234bc9be54a8a5aab51883d0 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 25 Mar 2016 23:43:24 +0100 Subject: fix cpu_speed reading for fixed speed cpu --- sysinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3