摘要:
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"%"}' 阅读全文
摘要:
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& 阅读全文