分析访问日志,qps

2015-06-14 0 598
分析访问日志,qps
  1 #!/bin/bash                                                                      
  2 # @File:         qps.sh                                                          
  3 # @Aim:                                                                          
  4 # @Author:       Foyon                                                           
  5 # @Created Time: 2014-04-23                                                      
  6 file='/home/fanhy/log/22.log'                                                    
  7 for ((i=1398175200;i<1398261600;i++))                                            
  8 do                                                                               
  9     time=`date -d @$i "+%Y:%H:%M:%S"`                                            
 10     qps=`cat $file | grep $time | wc -l`                                         
 11     echo time:$time,qps:$qps                                                     
 12 done  

遇见资源网 shell 分析访问日志,qps http://www.ox520.com/17026.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务