tomcat499、502、503异常处理办法

awk ‘if{(($9499)||($9502)||($9==503)) print $1,$9}’ /data/logs/linux_web/access.log|sort |uniq -c |sort -nr|awk '{if ($1>=100) print KaTeX parse error: Expected 'EOF', got '}' at position 2: 2}̲' > /tmp/ip.log…i" /etc/sysconfig/iptables/ >> /dev/null 2>&1
if [ $? -ne0 ];then
sed -i “/lo/a-A $i -j DROP” /etc/sysconfig/iptables/
fi
done
echo ok
/etc/init.d/iptables restart

while sleep 30;do /bin/bash auto_drop_ip.sh ;done	每隔30s运行一次

你可能感兴趣的:(nginx)