统计一天服务器的访问量 、pv、 uv:
awk ‘BEGIN{i=1}{i++}END{print i}‘ filename #
awk "{++state[$7]}END{for(key in state) print key,‘\t‘,state[key]}" filename #pv
awk "{++state[$1]}END{for(key in state) print key,‘\t‘,state[key]}" filename #uip
netstat -n|awk ‘/^tcp/ {++state[$NF]}END{for(key in state)print key,"\t",state[key]}‘ #查看nginx并发链接数
本文出自 “linuxyy” 博客,请务必保留此出处http://linuxyy.blog.51cto.com/9490250/1795701
原文地址:http://linuxyy.blog.51cto.com/9490250/1795701