added cpu core counting...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-03-31 16:11:04 +03:00
parent 8240771409
commit 6962d7c9a6
2 changed files with 14 additions and 4 deletions

View File

@ -1,7 +1,12 @@
#!/bin/bash
# XXX get this from /proc/cpuinfo...
THREADS=6
# SPU threads to keep free...
KEEP_FREE=2
THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l`
if [ $KEEP_FREE ] ; then
THREADS=$((THREADS - KEEP_FREE))
fi
# TODO make this runnable from anywhere...
# - prepend paths with './' only if local/relative

View File

@ -1,7 +1,12 @@
#!/bin/bash
# XXX get this from /proc/cpuinfo...
THREADS=6
# SPU threads to keep free...
KEEP_FREE=2
THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l`
if [ $KEEP_FREE ] ; then
THREADS=$((THREADS - KEEP_FREE))
fi
# TODO make this runnable from anywhere...
# - prepend paths with './' only if local/relative