Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #48 from amreo/master
Browse files Browse the repository at this point in the history
Fixed fetch/host to to add frequency in the cpumodel
  • Loading branch information
amreo authored Jan 31, 2020
2 parents a1ebbf4 + b834c64 commit f084e79
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fetch/host
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f084e79

Please sign in to comment.