摘要: awk '{buffer[$(NF-1)]++} END {for(x in buffer) print buffer[x]"\t"x;}' access.log | awk '/.*HIT.*/ {hitsum+=$1;print $0}/.*MISS.*/ {missum+=$1;print $0} END {print hitsum/(hitsum+missum)*100"%"}' 阅读全文
posted @ 2013-06-05 01:19 sunsweet 阅读(164) 评论(0) 推荐(0) 编辑
摘要: logformat log_format %>a %ui %un %ts "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh %tr #日志格式access_log /usr/local/squid2.7/var/logs/access.log log_formatField name syntax keys:{} modifier or argument. Also used to specify header names& 阅读全文
posted @ 2013-06-05 01:15 sunsweet 阅读(1482) 评论(0) 推荐(0) 编辑