msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

21 Feb 2008 Apache web connections pr hour

Posted by

This is a bash oneliner to show Apache web connections pr hour. It lists up the IPs that has accessed your webserver and the amount og accesses.

# cat /var/log/apache2/access_log_pario.no | grep "21/Jan/2008:.." | awk {' print $4":"$1 '} | sed 's/\[//g' | awk -F : {' print $1":"$2"\t\t"$5 '} | sort | uniq -c

Example output

37 21/Jan/2008:00          192.168.0.10

This shows that I had 37 hits from 00:00 – 01:00 in 20th February 2008.

Tags: , , , ,

Comments are closed.