免费资源网 – https://freexyz.cn/
代码如下:
#!/bin/shwhile sleep 30
do
SquidNum=`ps -ef|grep squid|grep -v grep|wc -l`
#HttpNum=`netstat -an|grep 0.0.0.0:80|grep -v grep|wc -l` #80状态
if [ $SquidNum != 3 ] ; then
/etc/rc3.duid start
adddate=`date +%Y-%m-%d`” “`date +%H:%M:%S`
echo “$adddate squid started!” >> /home/resquid.log
fi
#超过5000个http请求就重启squid服务
HttpNum=`netstat -an|grep 80|grep -v grep|wc -l`
if [ $HttpNum -gt 5000 ] ; then
/etc/rc3.duid restart
adddate=`date +%Y-%m-%d`” “`date +%H:%M:%S`
echo “$adddate http out 5000 squid started!” >> /home/resquid.log
fi
done
免费资源网 – https://freexyz.cn/
© 版权声明
THE END




![解决Tomcat启动失败:严重 [main] org.apache.catalina.util.LifecycleBase.handleSubClassException 初始化组件失败-迪思分享](https://img.dsary.com/dsimg/2024/10/31/6924730ae75493112ca95efbc694c729.png)




















暂无评论内容