fixup count of physical cores in discourse-setup (#739)
See also PR #702 for branch master
This commit is contained in:
parent
fed879dff5
commit
246f03b461
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue