当前位置:网站首页>How to efficiently analyze online log

How to efficiently analyze online log

2022-06-24 12:51:00 Please call me Zeng Aniu

Intercept the online.log 
awk '/Jun 21/,/Jun 22/{if(i>1)print x;x=$0;i++}' online.log > 0621.log

Analysis of the number of logical logs used
cat 0621.log|grep -E "seconds|Complete," > a
awk '{if(i>1)print x,i;x=$0;i++}' a > b
cat b|grep second|awk 'NR==1 {tmp=$8} NR>1 {print $8-tmp-1;tmp=$8}'

Analysis of checkpoints
cat 0621.log |grep seconds|awk '{print $1,$6}'

Logical log backup analysis
cat 0621.log|grep -E "seconds|Backup Completed" > a
awk '{if(i>1)print x,i;x=$0;i++}' a > b
cat b|grep second|awk 'NR==1 {tmp=$8} NR>1 {print $8-tmp-1;tmp=$8}'

Be careful :
If there is quickly Such content needs to be handled manually

原网站

版权声明
本文为[Please call me Zeng Aniu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241040464793.html