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 William Wernert
parent 73f52d69d4
commit e1bd8c6d51

View File

@@ -36,7 +36,7 @@ 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=$(grep -c "processor" /proc/cpuinfo)
CPUCORES=$(grep -c "processor" /proc/cpuinfo | grep -cv KVM)
LISTCORES=$(grep "processor" /proc/cpuinfo | awk '{print $3 " \"" "core" "\""}')
RANDOMUID=$(</dev/urandom tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
NODE_ES_PORT="9200"