We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c37c5d commit d00c2e7Copy full SHA for d00c2e7
discourse-setup
@@ -257,7 +257,8 @@ scale_ram_and_cpu() {
257
avail_cores=`sysctl hw.ncpu | awk '/hw.ncpu:/ {print $2}'`
258
else
259
avail_gb=$(check_linux_memory)
260
- avail_cores=`lscpu --parse=core | egrep -v ^# | sort -u | wc -l`
+ threads_per_core=$(lscpu | awk 'BEGIN {FS=":"} /Thread\(s\) per core/ {print $2}')
261
+ avail_cores=$((`lscpu | awk '/^CPU\(s\)/ {print $2}'`*${threads_per_core}))
262
fi
263
echo "Found ${avail_gb}GB of memory and $avail_cores physical CPU cores"
264
0 commit comments