diff options
author | Thomas Debesse <dev@illwieckz.net> | 2016-03-26 00:09:16 +0100 |
---|---|---|
committer | Thomas Debesse <dev@illwieckz.net> | 2016-03-26 01:13:38 +0100 |
commit | a2fc10aa5e07c1f95626019dfea98ed71ad2855a (patch) | |
tree | f82520ed154e6ef1d6ee0c6144573f799c8fbff7 | |
parent | aeda521695b7b0383889f2ea607a70873ddd12f0 (diff) |
better cpu frequency displaying (only Intel puts frequency in cpu name)
-rwxr-xr-x | sysinfo.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |