Shell脚本监控mongo并自动重启
mongo不知道怎么自己挂了,重启后又好了,过会又挂,没查到具体原因本来可以用supervisor,不过占用内容有点多,服务器扛不住,所以自己写脚本监控监控代码/opt/monitor/monitor-mongo.sh# 检查mongo是否还在进程中 count=`ps aux|grep mongo| grep -v grep |wc -l` echo $count now=$(date "+%....
Centos下利用shell脚本监控和重启进程.并邮件通知
1.centos服务器配置发送邮件功能参考此链接https://developer.aliyun.com/article/7655492.创建目录和脚本文件mkdir /shellvim /shell/restart.sh输入以下内容 #!/bin/bash ps -ef | grep redis | grep -v grep if [ $? -ne 0 ];then echo "red...
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。