Last active
August 29, 2015 14:00
-
-
Save RexKang/11358853 to your computer and use it in GitHub Desktop.
Apache日志统计脚本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 统计访问次数最多的前十名IP | |
awk '$0 !~/::1/&&$0 !~/127.0.0.1/{ip[$1]++}END{for(i in ip){print ip[i],i}}' access_log|sort -rn|head | |
# 统计访问次数最多的URL | |
awk '$0 !~/::1/&&$0 !~/127.0.0.1/{a[$7]++}END{for(i in a){print a[i]":"i }}' access_log|sort -rn|head |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment