summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Debesse <dev@illwieckz.net>2016-03-26 00:09:16 +0100
committerThomas Debesse <dev@illwieckz.net>2016-03-26 01:13:38 +0100
commita2fc10aa5e07c1f95626019dfea98ed71ad2855a (patch)
treef82520ed154e6ef1d6ee0c6144573f799c8fbff7
parentaeda521695b7b0383889f2ea607a70873ddd12f0 (diff)
better cpu frequency displaying (only Intel puts frequency in cpu name)
-rwxr-xr-xsysinfo.sh4
1 files 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