Linux日志检索

cat default.log | grep -E ‘/d/40510/110, timeCost:[1-9]+,[0-9]+ms’

cat zuul.log | grep -E ‘/d/40510/110, 耗时:[1-9]+,[0-9]+ms’

cat zuul.log | grep -E ‘耗时:[1-9]+,[0-9]+ms’

tail -f zuul.log |awk -F" " ‘$NF>1.000{print $NF}’

cat zuul.log | awk ‘/耗时:([0-9]+) ms/’ | awk ‘{costms=gensub(/.+耗时:([0-9]*) ms/,"\1",1);if(costms+0 > 5000) print NR, $0}’ >> out.log

cat XXX.log | grep -E ‘耗时:[1-9]+,[0-9]+ ms’

cat XXX.log | awk ‘/耗时:([0-9]+) ms/’ | awk ‘{costms=gensub(/.+耗时:([0-9]*) ms/,"\1",1);if(costms+0 > 5000) print NR, $0}’ |sed -n ‘/2020-10-15 07:00:00/,/2020-10-15 09:30:00/p’ |wc -l

cat XXX.log | awk ‘/timeCost:([0-9]+)ms/’ | awk ‘{costms=gensub(/.+timeCost:([0-9]*)ms/,"\1",1);if(costms+0 > 5000) print NR, $0}’ |wc -l

cat XXX.log |sed -n ‘/2020-10-15 07:00:00/,/2020-10-15 09:30:00/p’ | awk ‘/耗时:([0-9]+) ms/’ | awk ‘{costms=gensub(/.+耗时:([0-9]*) ms/,"\1",1);if(costms+0 > 1000) print NR, $0}’

cat XXX.log | awk ‘/耗时:([0-9]+) ms/’ | awk ‘{costms=gensub(/.+耗时:([0-9]*) ms/,"\1",1);if(costms+0 > 5000) print NR, $0}’ |grep hs-

cat XXX.log | grep -E ‘timeCost:[1-9]+,[0-9]+ms’

cat XXX.log |sed -n ‘/2020-10-15 07:00:00/,/2020-10-15 09:30:00/p’

cat XXX.log |sed -n ‘/2020-10-15 07:00/,/2020-10-15 09:30/p’

接口地址=http://fabio.service.consul:9999/hs-ytd-cons-server/d/40520/151,

cat XXX.log |sed -n ‘/2020-10-15 07:00:00/,/2020-10-15 09:30:00/p’

cat XXX.log |sed -n ‘/2020-10-15 07:00/,/2020-10-15 09:30/p’ | awk ‘/耗时:([0-9]+) ms/’ | awk ‘{costms=gensub(/.+耗时:([0-9]*) ms/,"\1",1);if(costms+0 > 5000) print NR, $0}’

sed -n ‘/2020-11-12 07:30:00./,/2020-11-12 08:05:06./p’ default-2020-11-12-*.log | grep /yt-med-restapi | grep -E ‘[1-9][0-9][0-9][0-9]+ms’ |wc -l

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值