nginx日志中得到访问量最高前10个IP:

cat access.log.10 | awk '{a[$1]++} END {for(b in a) print b"\t"a[b]}' | sort -k2 -r | head -n 10

 

访问量统计:每秒最大请求数倒叙排列10个

awk '{S[$4]++};END{for(i in S) {print S[i],i}}' /data/www/logs/newcomment.cntv.cn-access_log | sort -nr | head


统计http状态码:
awk '{S[$9]++};END{for(i in S) {print S[i],i}}' /data/www/logs/bbs.test.com-access_log-20160217 | sort -nr | head

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-06
  • 2022-03-07
  • 2021-12-07
  • 2021-06-08
  • 2021-05-17
  • 2022-12-23
相关资源
相似解决方案