Posts Tagged ‘filter ip’

Count IP’s in Apache/httpd log file

February 12th, 2012

Just a quick method to count how many times an IP has accessed your webserver.

from the command line type:

awk '{!a[$1]++}END{for(i in a) if ( a[i] >10 ) print a[i],i }' filename

where filename is the name/location of the file, example: /var/log/httpd/access_log

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d