常用统计命令
统计某个adx的reqtype
grep doubleclick request.log.2017 |cut -f46|awk -F '"reqtype":' '{print $2}' |awk -F',' '{print $1}' |sort |uniq -c |sort -k1 -nr
尺寸reqtype 排序
grep doubleclick request.log.2017-12-12-10 |cut -f26,46|grep vna|cut -f1|sort |uniq -c |sort -k1 -nr
hadoop fs -getmerge s3://mob-emr-test/yinghao/20171031/krdev_20171101/ kr1101devid.txt 单子的adtype 统计 grep 150920262 request.log.2017-11-03-15 |cut -f46 |awk -F"reqtype" '{print $2}' |awk -F"," '{print $1}' |sort |uniq -c |sort -k1 -nr 统计 网络类型 grep 150920262 request.log.2017-11-03-15 |cut -f33 |sort |uniq -c |sort -k1 -nr grep 176820767 request.log.2017-11-03-15 |cut -f33 |sort |uniq -c |sort -k1 -nr getCamp 176820767 |sort|uniq -c|sort -k1 -nr campaigns log ; grep campaigns runtime.log.2017-11-03-15 |grep 176820767 grep campaigns runtime.log.2017-11-03-16 |grep 150920262 |cut -f3 |sort |uniq -c |sort -k1 -nr grep campaigns runtime.log.2017-11-03-16 |grep 176820767 |cut -f3 |sort |uniq -c |sort -k1 -nr
grep all request from file and id from ids
awk -F'\t' '{if(FILENAME=="ids"){A[$0]="1"}else if(A[$8]=="1"){print $0}}' ids request.log.2018-01-18-08 > imp-reqlogs &