From b834c643e4177ca8a87c24ec7a78db3cf63a44ff Mon Sep 17 00:00:00 2001 From: amreo Date: Fri, 31 Jan 2020 14:11:58 +0100 Subject: [PATCH] Fixed fetch/host to to add frequency in the cpumodel --- fetch/host | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fetch/host b/fetch/host index 4a97d5a..0b081bf 100755 --- a/fetch/host +++ b/fetch/host @@ -30,6 +30,13 @@ if [[ $VIRTUAL = 'Y' ]]; then else SOCKET=$(cat /proc/cpuinfo |grep -i "physical id" |sort -n|uniq|wc -l) fi + +if [[ $(echo $CPU_MODEL| grep -c "@") -eq 0 ]]; then + CPU_EXTRA_SPEED=@$(grep "cpu MHz" /proc/cpuinfo | head -n 1 | awk -F ":" '{ print $NF }')Mhz +else + CPU_EXTRA_SPEED= +fi + KERNEL=$(uname -r) OS=$(cat /etc/redhat-release) if [[ $? != 0 ]]; then @@ -89,7 +96,7 @@ else fi echo -n "hostname: $HOSTNAME -cpumodel: $CPU_MODEL +cpumodel: $CPU_MODEL $CPU_EXTRA_SPEED cputhreads: $CPU_THREAD cpucores: $CPU_CORES socket: $SOCKET