find most accessed ip from apache log

From WebHostingNeeds.com
Jump to: navigation, search

To find most accessed IP from apache log, run

cat APACHE_ACCESS_LOG_FILE | awk -F' ' '{print $1}' | sort | uniq -c | sort -n

If you want to see IP that made most POST request

cat APACHE_ACCESS_LOG_FILE | grep POST | awk -F' ' '{print $1}' | sort | uniq -c | sort -n



apache

awk

grep