2019年9月29日

防DOS攻击-网络连接法

摘要: #!/bin/bash netstat -antup | grep SYN_RECV | awk '{print $5}' |awk -F: '{print $1}'|sort|uniq -c > /tmp/opt while read line do #echo $line count=$(echo $line|awk '{print $1}') ... 阅读全文

posted @ 2019-09-29 17:12 快乐的人啊 阅读(88) 评论(0) 推荐(0) 编辑

检测MySQL主从是否异常

摘要: #!bin/bash user='root' passwd="123" host="192.168.192.156" mycmd="mysql -u$user -p$passwd -h $host" chkdb(){ list=($($mycmd -e "show slave status \G"|egrep "Running|Bebind"|awk -F: '{print $2... 阅读全文

posted @ 2019-09-29 15:58 快乐的人啊 阅读(240) 评论(0) 推荐(0) 编辑

shell检测网站地址是否存活

摘要: #!/bin/bash . /etc/init.d/functions url_list=(www.baidu.com) ChkCurl(){ i=0 while [ $i -lt 2 ] do curl http://${url_list[$i]} &>/dev/null if [ $? -eq 0 ];then action "${url_list[$i]}" /bin/ture else a 阅读全文

posted @ 2019-09-29 15:24 快乐的人啊 阅读(249) 评论(0) 推荐(0) 编辑

导航