1 检测web服务器的链接数量及状态: netstat -ant|awk '{print $5 \t $6}'|grep ::ffff:|sed -e 's/::ffff://' -e 's/:[0-9]*//' |sort|uniq -c| sort -rn|head -10 结果: 122 125.162.71.199 TIME_WAIT 99 79.119.125.43 TIME_WAIT 81 125.167.243.77 TIME_WAIT 75 110.137.106.75 TIME_WAIT 29 118.97.140.166 TIME_WAIT 29 115.192.