LINUX 访问日志 基本分析
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
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
上一篇:PHP 后端协议规范
下一篇:PHP 开发命名规则
发表评论