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 7f253c3 commit c687fd8Copy full SHA for c687fd8
discourse-setup
@@ -258,7 +258,8 @@ scale_ram_and_cpu() {
258
avail_cores=`sysctl hw.ncpu | awk '/hw.ncpu:/ {print $2}'`
259
else
260
avail_gb=$(check_linux_memory)
261
- avail_cores=$((`awk '/cpu cores/ {print $4;exit}' /proc/cpuinfo`*`sort /proc/cpuinfo | uniq | grep -c "physical id"`))
+ threads_per_core=$(lscpu | awk 'BEGIN {FS=":"} /Thread\(s\) per core/ {print $2}')
262
+ avail_cores=$((`lscpu | awk '/^CPU\(s\)/ {print $2}'`/${threads_per_core}))
263
fi
264
echo "Found ${avail_gb}GB of memory and $avail_cores physical CPU cores"
265
0 commit comments