Find out who’s hammering your web server

Posted 5 months, 3 weeks ago at 4:45 pm. 2 comments

cat /path/to/access-log | awk {'print $1'} | sort | uniq -c | sort -n | tail -100

awk {’print $1′} : print the IP column
sort : sort by ip
uniq - c : count uniques
sort -n : numeric sort
tail -100 : show last 100 hits

2 Replies

  1. Uporabno! :) Fajn je se bolj detaljno pogledat, z npr. | grep “10/Jan” z default combined logom.

  2. hmnjah :) ce mas log rotate ob 00:00 ni frkce :P


Leave a Reply