- #!/bin/bash
- # @File: qps.sh
- # @Aim:
- # @Author: Foyon
- # @Created Time: 2014-04-23
- file='/home/fanhy/log/22.log'
- for ((i=1398175200;i<1398261600;i++))
- do
- time=`date -d @$i "+%Y:%H:%M:%S"`
- qps=`cat $file | grep $time | wc -l`
- echo time:$time,qps:$qps
- done
- #该片段来自于http://www.codesnippet.cn/detail/250420149380.html
来源: http://www.codesnippet.cn/detail/250420149380.html