返回官网

LINUX 访问日志 基本分析

狒狒 2018-8-27 Linux 658 次
LINUX 访问日志 基本分析


cat www.perfant.com.access.log |  awk  '$4 >="[31/May/2016:00:00:00" && $4 <="[31/May/2016:23:59:59"'  > ./www.perfant.com.access.20160531.log



awk '{print $1 $7 $11 }'  www.perfant.com.access.20160531.log|sort | grep 'tv.sohu.com'|uniq -c |sort -n -k 1 -r|more



###################################################

cd /data/logs/nginx/

获取某天从sohu.com的所有流量

cat /data/logs/nginx/www.perfant.com.access.log|  awk  '$4 >="[29/Jun/2016:00:00:00" && $4 <="[29/Jun/2016:23:59:59"' | grep '/sohu/index.php?userId'  > /data/logs/nginx/www.perfant.com.access.20160629.log



PV 
awk '{print $7}' /data/logs/nginx/www.perfant.com.access.20160629.log|wc -l




UV
awk '{print $1}' /data/logs/nginx/www.perfant.com.access.20160629.log|sort | uniq -c |wc -l

发表评论

Copyright © 2016 DEWEBSTUDIO