标签:begin nginx div qps uniq shel else 实时 bsp
tail -f access.log | awk -F ‘[‘ ‘{print $2}‘ | awk ‘BEGIN{key="";count=0}{if(key==$1){count++}else{printf("%s\t%d\r\n", key, count);count=1;key=$1}}‘
tail -f access.log | awk -F ‘[‘ ‘{print $2}‘ | awk ‘{print $1}‘ | uniq -c
cat access.log | awk -F ‘[‘ ‘{print $2}‘ | awk ‘{print $1}‘ | sort | uniq -c |sort -k1,1nr
一行 Shell 通过 Nginx access 日志实时统计单台机器QPS
标签:begin nginx div qps uniq shel else 实时 bsp
原文地址:http://www.cnblogs.com/zyxx/p/7669137.html