Commits

Anonymous committed 0832465

slavehost.conf prefer nproc to determine number of cpus available

Comments (0)

Files changed (1)

slave/etc/vlbuildslave/slavehost.conf

 
 
 function count_cpus() {
-        echo $(cat /proc/cpuinfo |grep -i ^processor|wc -l)
+	nprocbin=$(which nproc)
+	if [ -z $nprocbin ]; then
+	        echo $(cat /proc/cpuinfo |grep -i ^processor|wc -l)
+	else
+		echo `nproc`
+	fi
 }