jgugugiug 发表于 2018-11-27 08:38:38

linux下apache监控脚本

Apache 监控脚本二  #!/bin/shif [ ! -e /root/tmp ];then      mkdir /root/tmpfiDATA=`date +%Y_%m_%d_%H_%M_%S`ps -ef|grep httpd|grep -v grep|grep -v monitorif [ $? -eq 0 ]then   echo "apache is ok"else   echo "apache is downed at:"$DATA >> /root/tmp/httpd.log.txt   killall httpd   sleep 1   ulimit -n 65535    ulimit -s unlimited -u unlimited    ulimit -c unlimited   /usr/local/apache2/bin/apachectl start &fi

页: [1]
查看完整版本: linux下apache监控脚本