Skip to content

Commit

Permalink
check for grep not hedgehog as process owner
Browse files Browse the repository at this point in the history
  • Loading branch information
johndickinson committed Jun 15, 2016
1 parent fec959b commit 08d30ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/refile_and_grok.in
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ 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 | grep ^hedgehog | 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 "$(date) Too many dsc-extractor processes already running, exiting"
Expand Down

0 comments on commit 08d30ed

Please sign in to comment.