PIDS=$(ps ax | grep -i ‘kafka.Kafka’ | grep java | grep -v grep | awk ‘{print $1}’)
修改如下
PIDS=$(jps -lm | grep -i 'kafka.Kafka' | awk '{print $1}')
PIDS=$(ps ax | grep java | grep -i QuorumPeerMain | grep -v grep | awk '{print $1}')
修改如下
PIDS=$(jps -lm | grep -i QuorumPeerMain | awk '{print $1}')