projects
/
discourse_docker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4159764
)
Fix physical core calculation
author
Teemu Heikkilä
<teemu@emblica.fi>
Fri, 28 Oct 2016 18:37:46 +0000
(21:37 +0300)
committer
Teemu Heikkilä
<teemu@emblica.fi>
Fri, 28 Oct 2016 18:37:46 +0000
(21:37 +0300)
discourse-setup
patch
|
blob
|
blame
|
history
diff --git
a/discourse-setup
b/discourse-setup
index 8026da078e4a5efcfa3be612a4b7eb0168eb14e0..45c769670f3a091e589af822d3b18c3b102b87a3 100755
(executable)
--- a/
discourse-setup
+++ b/
discourse-setup
@@
-134,8
+134,8
@@
scale_ram_and_cpu() {
avail_gb=$(check_osx_memory)
avail_cores=`sysctl hw.ncpu | awk '/hw.ncpu:/ {print $2}'`
else
- avail_gb=$(check_linux_memory)
- avail_cores=
`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $4}'`
+ avail_gb=$(check_linux_memory)
+ avail_cores=
$((`awk '/cpu cores/ {print $4;exit}' /proc/cpuinfo`*`sort /proc/cpuinfo | uniq | grep -c "physical id"`))
fi
echo "Found ${avail_gb}GB of memory and $avail_cores physical CPU cores"