HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM fix zombie-detectors' handling of no processes -- was treating no processes as one possible zombie
This commit is contained in:
parent
7b80c803b7
commit
44367f55e8
|
@ -99,8 +99,12 @@ find_processes () {
|
||||||
### Look for zombies
|
### Look for zombies
|
||||||
zombies () {
|
zombies () {
|
||||||
ZOMBIES=`find_processes`
|
ZOMBIES=`find_processes`
|
||||||
# xargs trims white space before and after the count
|
if [[ -z ${ZOMBIES} ]]
|
||||||
ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"|wc -l|xargs`
|
then
|
||||||
|
ZOMBIE_TESTS_COUNT=0
|
||||||
|
else
|
||||||
|
ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"| wc -l| xargs`
|
||||||
|
fi
|
||||||
if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
|
if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
|
||||||
wait=30
|
wait=30
|
||||||
echo "`date` Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es) listed below; waiting ${wait}s to see if just slow to stop"
|
echo "`date` Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es) listed below; waiting ${wait}s to see if just slow to stop"
|
||||||
|
|
Loading…
Reference in New Issue