From a2fc10aa5e07c1f95626019dfea98ed71ad2855a Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sat, 26 Mar 2016 00:09:16 +0100 Subject: better cpu frequency displaying (only Intel puts frequency in cpu name) --- sysinfo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysinfo.sh b/sysinfo.sh index eebff52..e0e1827 100755 --- a/sysinfo.sh +++ b/sysinfo.sh @@ -18,7 +18,7 @@ swap_free=`cat /proc/meminfo | grep -i SwapFree | awk '{printf "%d",$2/1024;}'` swap_used=`echo ${swap_total} ${swap_free} | awk '{printf "%d",$1-$2;}'` #--- [ CPU ] -------------------------- -cpu=`cat /proc/cpuinfo | grep "model name" | head -n 1 | sed 's/^.*: //'` +cpu=`cat /proc/cpuinfo | grep "model name" | head -n 1 | sed 's/[ ][ ]*/ /g;s/^.*: //' | sed -e 's/ @ .*//'` if [ -z "${cpu}" ]; then # fallback cpu=`uname -p` @@ -73,7 +73,7 @@ esac echo -n "[${host}]" echo -n "[${os}]" -echo -n "[${cpu}]" +echo -n "[${cpu} @ ${cpu_speed} MHz]" if [ ! -z "${vga}" ]; then echo -n "[${vga}]" fi -- cgit v1.2.3