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 20e33fb commit 7a99d66Copy full SHA for 7a99d66
discourse-setup
@@ -258,7 +258,7 @@ scale_ram_and_cpu() {
258
else
259
avail_gb=$(check_linux_memory)
260
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}))
+ avail_cores=$((`lscpu | awk '/^CPU\(s\):[[:blank:]]+[0-9]+[[:blank:]]*$/ {print $2; exit}'`*${threads_per_core}))
262
fi
263
echo "Found ${avail_gb}GB of memory and $avail_cores physical CPU cores"
264
0 commit comments