From 394dfe654f5e1e043cf4303543c18a38a87cea6c Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 8 Apr 2020 13:59:01 -0400 Subject: [PATCH] Filter out KVM kits so cpu count is correct --- setup/so-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index 9d8675d7d..7d1a03722 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -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"