Friday, February 16, 2007

Catch the IP in the httpd.log

Catch the ip of clients from error_log files... needs improvement

grep '\[client' /var/log/httpd/error_log | gawk '{ print $8 }' | sort | uniq -c | sort -nr


This script counts the IP who has the most occurrence of the substring specified.

grep "newthread&fid" /var/log/httpd/access_log | gawk '{ print $1 }' | sort | uniq -c | sort -nr

First posting Jan.26, 2007

No comments: