个人检查php-fpm

!/bin/bash

check php-fpm server up/down

while :
do

sleep 15;
/usr/bin/curl https://api.itboye.com/public/status.php  << ! > /alidata/server/fpm.log 

quit
!
timestamp=date '+%Y-%m-%d %H:%M:%S'
content=$(cat /alidata/server/fpm.log)


if [ "$content" = "ok" ];then
    echo -e "ok\n" ;
else 
    /etc/init.d/php-fpm restart

    echo -e "$timestamp"" php-fpm restart\n" >> /alidata/server/restart.log;
fi

done

上一篇:dubbo - 负载均衡调用过程


下一篇:建设绿色数据中心,要抓住重点