监听zookeeper启动
#!/bin/sh. /etc/profile. ~/.bash_profiledate=`date`cd /usr/local/zookeeperecho "$date star to monitor zookeeper" >> ./monitor.logpid=`jps | grep 'QuorumPeerMain'`if [ -z "$pid" ];then...
·
#!/bin/sh
. /etc/profile
. ~/.bash_profile
date=`date`
cd /usr/local/zookeeper
echo "$date star to monitor zookeeper" >> ./monitor.log
pid=`jps | grep 'QuorumPeerMain'`
if [ -z "$pid" ];then
echo "find the zookeeper down" >> ./monitor.log
cd bin
./zkServer.sh start
fi
同样配置cron定时任务监听zookeeper挂了后重启
更多推荐
已为社区贡献8条内容
所有评论(0)