慢慢赚钱博客

9月 20 2017

监控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

Written by admin