fixup count of physical cores in discourse-setup (#739)

See also PR #702 for branch master
This commit is contained in:
BigEd 2023-10-09 14:47:25 +01:00 committed by GitHub
parent fed879dff5
commit 246f03b461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ scale_ram_and_cpu() {
avail_cores=`sysctl hw.ncpu | awk '/hw.ncpu:/ {print $2}'`
else
avail_gb=$(check_linux_memory)
avail_cores=$((`awk '/cpu cores/ {print $4;exit}' /proc/cpuinfo`*`sort /proc/cpuinfo | uniq | grep -c "physical id"`))
avail_cores=`lscpu --parse=core | egrep -v ^# | sort -u | wc -l`
fi
echo "Found ${avail_gb}GB of memory and $avail_cores physical CPU cores"