$1 2222 $2 - $3 [03/Mar/2017:14:55:09 +0800] "GET /zlgxjy/uploads/pc/images/b1e2c501-8ede-44a7-abdc-e6b0a22b439a.jpg HTTP/1.1" "-" 304 414585 - "http://222.209.88.121:9999/zlgxwl/login/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) (KHTML, Firefox/51.0" Gecko) 10.82.12.97:9880-0.001-0.001 Safari/537.36" "-" 10.82.12.97:9180-0.177-0.177 awk '{print $6}' access.log |wc -l 总PV量: grep index.html access.log | wc -l 可统计单个链接地址访问量 awk '{print $1}' access.log | sort -r |uniq -c | wc -l 独立IP awk '{print $10}' access.log | sort -r |uniq -c |wc -l UV统计 awk '{print $7}' access.log|sort | uniq -c |sort -n -k 1 -r|more 查询访问最频繁的URL awk '{print $1}' access.log|sort | uniq -c |sort -n -k 1 -r|more 查询访问最频繁的IP awk '{print $1}' access.log|sort | uniq -c |sort -n -k 1 -r|head 查询访问最频繁的前10个IP awk '{print $1}' access.log | sort | uniq -c | sort -nr | head -n 5 cat access.log | awk '{print $(NF), $1 }' | sed 's/(ms)//g;s/exec://g' | sort -nr -k 1 | head -20 cat access.log|awk -F "-" '{print $NF>1}' 2.统计请求响应时间超过10s的记录 awk '($NF > 10){print $0}' /usr/local/tengine/logs/cut-log/access_2015-01-12.log >t10_0112.log awk '($NF > 5){print $0}' access.log | awk -F\" '{print $2}' |sort -n| uniq -c|sort -nr|head -20 cat access.log |awk '{print $0}'|sed 's/(ms)//g;s/exec://g' | sort -nr -k 1 | head -20 sed 's/^ //g' log | grep "active call" | cut -d " " -f 1 | sort | tail -n 1 awk '/calls?$/{if(a<$1){a=$1}}END{print a}' log |
nginx相应的查询、PV统计
最新推荐文章于 2024-08-07 15:09:42 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)