show variables
show variables like 'log_%';
show variables like '%slow%';
set global log_slow_queries=ON ;
解析DNS:nslookup shippingapi.ebay.cn nslookup api-3t.paypal.com
netstat -tln 端口使用情况
netstat -na|grep ESTABLISHED|wc -l 当前80端口的[请求总数]
netstat -nat|grep -i 80|wc -l 当前80端口[*连接数*]
tcpdump -i eth0 -tnn dst port 80 -c 1000 | awk -F"." '{print $1"."$2"."$3"."$4}' | sort | uniq -c | sort -nr |head -20 80端口的访问最高
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n 显示每个ip的连接数
netstat -n|grep TIME_WAIT|awk '{print $5}' |sort|uniq -c|sort -rn|head -n20 查找较多time_wait连接
netstat -anlp|grep 80|grep tcp|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -nr|head -n20 查找请求数请20个IP(*常用于查找攻来源*)
netstat -ant |awk '/:80/{split($5,ip,":");++A[ip[1]]}END{for(i in A) print A[i],i}' |sort -rn|head -n20 查找请求数请20个IP(*常用于查找攻来源*)
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
ps -ef | grep httpd | wc -l Apache能够处理多少个并发请求
show variables like 'log_%';
show variables like '%slow%';
set global log_slow_queries=ON ;
解析DNS:nslookup shippingapi.ebay.cn nslookup api-3t.paypal.com
netstat -tln 端口使用情况
netstat -na|grep ESTABLISHED|wc -l 当前80端口的[请求总数]
netstat -nat|grep -i 80|wc -l 当前80端口[*连接数*]
tcpdump -i eth0 -tnn dst port 80 -c 1000 | awk -F"." '{print $1"."$2"."$3"."$4}' | sort | uniq -c | sort -nr |head -20 80端口的访问最高
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n 显示每个ip的连接数
netstat -n|grep TIME_WAIT|awk '{print $5}' |sort|uniq -c|sort -rn|head -n20 查找较多time_wait连接
netstat -anlp|grep 80|grep tcp|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -nr|head -n20 查找请求数请20个IP(*常用于查找攻来源*)
netstat -ant |awk '/:80/{split($5,ip,":");++A[ip[1]]}END{for(i in A) print A[i],i}' |sort -rn|head -n20 查找请求数请20个IP(*常用于查找攻来源*)
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
ps -ef | grep httpd | wc -l Apache能够处理多少个并发请求