shell统计每秒log文件中行数增加值
来源:互联网 发布:软件创业项目容易吗? 编辑:程序博客网 时间:2024/06/05 09:45
DATE=$(date +%s)
count=$(grep -c "" $1)
time=0
sum=0
while true
do
DATE_New=$(date +%s)
if (( $(date +%s) == DATE+1))
then
((time++))
DATE=$(date +%s)
count_new=$(grep -c "" $1)
add=$((count_new - count))
if [ ! -n "$add" ]
then
add=0
fi
((sum = sum + add))
echo add line number is:$add average:$((sum / time))
count=$count_new
fi
done
count=$(grep -c "" $1)
time=0
sum=0
while true
do
DATE_New=$(date +%s)
if (( $(date +%s) == DATE+1))
then
((time++))
DATE=$(date +%s)
count_new=$(grep -c "" $1)
add=$((count_new - count))
if [ ! -n "$add" ]
then
add=0
fi
((sum = sum + add))
echo add line number is:$add average:$((sum / time))
count=$count_new
fi
done
0 0
- shell统计每秒log文件中行数增加值
- Python学习笔记 --- 统计文本中行数
- shell脚本统计每秒话单发送量
- 【转】mysql5.0.x统计每秒增删改查替换数及系统每秒磁盘IO
- 一个统计Word文档中行数的VBA例程
- shell脚本统计文件的记录条数
- Shell gawk统计文件的各个单词数
- shell每秒执行一次
- loadrunner每秒事务数
- 递归统计文件数
- ceph 文件数统计
- 求统计文件shell脚本?
- 统计文件行数的shell
- linux shell 统计passwd文件shell个数
- 给CSDN blog 增加文件下载统计
- Linux shell统计字节数、字数、行数
- spark-shell 统计hbase数据条目数
- 查询每秒平均事务数
- HTML-Day01-2
- 深入理解Android中View
- Workerman--Fatal error: Class 'MongoClient' not found
- Elasticsearch as a Time Series Data Store
- Android - View绘图原理总结
- shell统计每秒log文件中行数增加值
- 策略模式vs工厂模式的区别
- 复制Windows中文件致LINUX系统中
- ios代码分块管理的一些方法
- 创建一个活动(Activity)
- opencv答题卡识别 (一)
- 安卓中的动画
- python编写windows平台下脚本二三事
- PV、UV、UIP、VV、CPC、CPM、RPM、CTR是什么意思?