find从多个日志文件获得高stream量的VirtualHost

有时我的Apache服务器负载很重。 我有很多VirtualHost,每个都有自己的日志文件。

这个结构就像这个/var/www/httpd-logs/virtualhost.com.access.log

我可以用什么命令find在过去X分钟内负载过重的网站?

然后,我会分析相应的网站日志find问题。

for file in `ls -1 /var/www/httpd-logs/*.log` ; do echo "vhost $file" grep 2015:HOURHERE:MINUTESFIRSTDIGIT $file | wc -l done 

有点贫民窟,但如果你想要一个10分钟的时间,比如说2:50-2:59,那么grep行是grep 2015:14:5 $ file | wc -l