Skip to content

Commit

Permalink
Merge pull request #151 from johndickinson/feature/improvenumprocs
Browse files Browse the repository at this point in the history
Feature/improvenumprocs
  • Loading branch information
saradickinson authored Jun 15, 2016
2 parents a478e3e + 08d30ed commit 29bbe59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/refile_and_grok.in
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ fi

# Check to see if dsc-extractor is already running and if it is then only start
# CPUS - num_running_dsc-extractors
NUM_RUNNING=$(ps -ef | awk ' { print $8 } ' | grep dsc-extractor | wc -l)
NUM_RUNNING=$(ps -ef | grep -v grep | awk ' { print $8 } ' | grep dsc-extractor | wc -l)
CPUS=$(( CPUS - NUM_RUNNING ))
if [ $CPUS -le 0 ] ; then
echo "To many dsc-extractor processes already running, exiting"
echo "$(date) Too many dsc-extractor processes already running, exiting"
exit 1
fi
echo "$(date) Starting $CPUS new processes."

if [[ "$INPUT" = "XML" || "$INPUT" = "DAT" ]] && [ "$OUTPUT" = "DB" ]
then
Expand Down

0 comments on commit 29bbe59

Please sign in to comment.