我如何知道谁在向服务器发送大量请求?

我正在运行Apache服务器,并希望查明谁(IP地址)使用命令行在过去24小时内提出了很多请求。 还想知道谁目前有最开放的联系?

我正在运行Apache服务器,并希望查明谁(IP地址)使用命令行在过去24小时内提出了很多请求。

awk '/29\/Sep\/2011/ { print $1 }' /path/to/access_log | sort | uniq -c | sort -rn | head 

还想知道谁目前有最开放的联系?

 netstat -natp | grep httpd | awk '{ print $5 }' | cut -d: -f1 | sort | uniq -c | sort -rn | head 

你可以使用tail /path/to/apache_log_file (在/var/log/apache2 )。 查看当前连接的一种方法是使用mod_status 。 你也可以使用netstat -a |grep www