diff options
Diffstat (limited to 'utils/getNumJobs.sh')
| -rw-r--r-- | utils/getNumJobs.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/getNumJobs.sh b/utils/getNumJobs.sh new file mode 100644 index 0000000..7219301 --- /dev/null +++ b/utils/getNumJobs.sh @@ -0,0 +1,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)) |