/var/log/nginx/access.log 是nignx日志的路径,如果你的日志不在这请自行替换
查询访问最频繁的URL
awk '{print $7}' /var/log/nginx/access.log|sort | uniq -c |sort -n -k 1 -r|more
查询访问最频繁的IP
awk '{print $1}' /var/log/nginx/access.log|sort | uniq -c |sort -n -k 1 -r|more
根据访问IP统计UV
awk '{print $1}' /var/log/nginx/access.log|sort | uniq -c |wc -l
统计访问URL统计PV
awk '{print $7}' /var/log/nginx/access.log|wc -l
5.根据时间段统计查看日志
cat /var/log/nginx/access.log| sed -n '/14\/Mar\/2015:21/,/14\/Mar\/2015:22/p'|more