Page is a not externally linkable
- WebmasterWorld
-- Webmaster General
---- Neat little unix/linux command to list top IP's accessing your site


maximillianos - 1:35 am on Feb 1, 2010 (gmt 0)


Nice little shell command to get a real-time list of the top IP's hitting your site at the moment...

[b]tail -50000 access_log | awk '{print $1}' | sort | uniq -c | sort -n | tail[/b]

The -50000 says look at the last 50000 lines of the access_log file. You can tweak that if you need to look at more or less entries.

Helped me today when I was getting bombed by "omgilibot" essentially nearly bringing my server down. I was able to pinpoint the little sucker in seconds and add them to my firewall block list.


Thread source:: http://www.webmasterworld.com/webmaster/4071661.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com