View number of requests by time from Apache access log
- Overall requests in an hour
- grep "18/Apr/2018:11" /var/log/httpd/access_log | wc -l
- Overall requests in a minute
- grep "18/Apr/2018:11:05" /var/log/httpd/access_log | wc -l
- Overall requests in a minute
- grep "18/Apr/2018:11:05:10" /var/log/httpd/access_log | wc -l
- Overall requests by sec in an hour (group by sec)
- grep "18/Apr/2018:11" /var/log/httpd/access_log | cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":"$3}' | sort -nk1 -nk2 | uniq -c | awk '{ if ($1 > 10) print $0}'
No comments:
Post a Comment