访问量排名前10的ip地址 :
cat access.log | cut -f1 -d " " | sort | uniq -c | sort -k 1 -n -r | head -10
页面访问量排名前10的url :
cat access.log | cut –f4 -d " " | sort | uniq -c | sort -k 1 -n -r | head -10
查看最耗时的页面 :
cat access.log | sort -k 2 -n -r | head -10
统计404页面占比 :\
export total_line=`wc -l access.log | cut -f1 -d " "` && export not_found_line=`awk '$6=='404'{print $6}' access.log | wc -l` && expr $not_found_line \* 100 / $total_line