diff --git a/BARRACUDA.sh.txt b/BARRACUDA.sh.txt index 004163c630f4c325ac79eb85c876177c9c88f9c2..8b743e24cd31568f17a8d951c3d85344687942b1 100755 --- a/BARRACUDA.sh.txt +++ b/BARRACUDA.sh.txt @@ -1805,7 +1805,12 @@ tune_memory_limits () { if [[ "$_AWS_TEST_A" =~ "cloudimg" ]] || [[ "$_AWS_TEST_B" =~ "cloudconfig" ]] ; then _VMFAMILY="AWS" fi - _CPU_IS=`nproc` + _NPROC_TEST=$(which nproc) + if [ -z "$_NPROC_TEST" ] ; then + _CPU_IS=$(grep -c processor /proc/cpuinfo) + else + _CPU_IS=`nproc` + fi let "_CPU_MX = (($_CPU_IS * 2))" if [ "$_CPU_MX" -lt "4" ] ; then _CPU_MX=4 diff --git a/aegir/tools/BOND.sh.txt b/aegir/tools/BOND.sh.txt index 8b11afd738acbb3ce740c1bcffb1b57f11c5cb84..499333c130067e6cefa3e40b2075911dec290c00 100755 --- a/aegir/tools/BOND.sh.txt +++ b/aegir/tools/BOND.sh.txt @@ -626,7 +626,12 @@ tune_memory_limits () { if [[ "$_AWS_TEST_A" =~ "cloudimg" ]] || [[ "$_AWS_TEST_B" =~ "cloudconfig" ]] ; then _VMFAMILY="AWS" fi - _CPU_IS=`nproc` + _NPROC_TEST=$(which nproc) + if [ -z "$_NPROC_TEST" ] ; then + _CPU_IS=$(grep -c processor /proc/cpuinfo) + else + _CPU_IS=`nproc` + fi let "_CPU_MX = (($_CPU_IS * 2))" if [ "$_CPU_MX" -lt "4" ] ; then _CPU_MX=4