Filter out KVM kits so cpu count is correct

This commit is contained in:
Mike Reeves
2020-04-08 13:59:01 -04:00
committed by GitHub
parent eeeec6f7b9
commit 394dfe654f

View File

@@ -36,8 +36,8 @@ export PATH=$PATH:../salt/common/tools/sbin
HOSTNAME=$(cat /etc/hostname)
TOTAL_MEM=`grep MemTotal /proc/meminfo | awk '{print $2}' | sed -r 's/.{3}$//'`
NICS=$(ip link | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2 " \"" "Interface" "\"" " OFF"}')
CPUCORES=$(cat /proc/cpuinfo | grep processor | wc -l)
LISTCORES=$(cat /proc/cpuinfo | grep processor | awk '{print $3 " \"" "core" "\""}')
CPUCORES=$(cat /proc/cpuinfo | grep processor | grep -v KVM | wc -l)
LISTCORES=$(cat /proc/cpuinfo | grep processor | grep -v KVM | awk '{print $3 " \"" "core" "\""}')
RANDOMUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
NODE_ES_PORT="9200"
SETUPLOG="/root/sosetup.log"