监控cassandra并重启的shell脚本

#!/bin/bash
xxnumber=`ps -ef | grep cassandra | grep -v "grep"|wc -l`
echo "process is runing "
if [ $xxnumber -eq 0 ]
then
echo "process is dead and restart...."
    /data/apache-cassandra-3.0.2/bin/cassandra
fi

滚动至顶部