aboutsummaryrefslogtreecommitdiff
path: root/utils/getNumJobs.sh
blob: 72193010c647fdc9a8da23b8a8b6baa118859938 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962

# How many processors do we have?
numprocs=`grep '^processor' /proc/cpuinfo | wc -l`

# We use two jobs per processor, so that one can be using the processor
# while another is waiting for disk I/O.
echo $((${numprocs} * 2))