Count IP’s in Apache/httpd log file

February 12th, 2012 by admin Leave a reply »

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
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz
Advertisement

Leave a Reply

You must be logged in to post a comment.