统计springbootaccess.log接口耗时大于10秒的接口
日志格式
- 10.31.145.53 - [30/Dec/2019:00:00:20 +0800] GET /mem-webapp-rpc/getDistMemberForPos 200 42341 7
- 10.31.145.53 - [30/Dec/2019:00:00:21 +0800] GET /mem-webapp-rpc/getMemcatForPos 200 40 130
- 10.31.145.53 - [30/Dec/2019:00:00:21 +0800] GET /mem-webapp-rpc/getMemberForPos 200 40 4
- 10.31.145.53 - [30/Dec/2019:00:00:21 +0800] GET /mem-webapp-rpc/getMemPointRuleList 200 40 2
- 10.31.145.53 - [30/Dec/2019:00:00:21 +0800] GET /mem-webapp-rpc/getPromRuleListForPos 200 40 2
- 10.31.145.53 - [30/Dec/2019:00:00:23 +0800] GET /mem-webapp-rpc/getSmPromRuleListForPos 200 10974 1490
- 10.31.145.53 - [30/Dec/2019:00:00:25 +0800] GET /mem-webapp-rpc/getSmPromRuleListForPos 200 72 668
- 10.31.145.53 - [30/Dec/2019:00:00:25 +0800] GET /mem-webapp-rpc/getDistMemberForPos 200 40 6
- 10.31.145.53 - [30/Dec/2019:00:01:45 +0800] GET /mem-webapp-rpc/getDistMemberForPos 200 40 133
- 10.31.145.53 - [30/Dec/2019:00:01:45 +0800] GET /mem-webapp-rpc/getDistMemberForPos 200 883 87
- 10.31.145.53 - [30/Dec/2019:00:01:45 +0800] GET /mem-webapp-rpc/getMemcatForPos 200 40 2
统计脚本
cat access.log | awk "{ if ($10 >10 ) print}"|awk "{print $7}"|sort|uniq -c|sort -nr|head
以上是 统计springbootaccess.log接口耗时大于10秒的接口 的全部内容, 来源链接: utcz.com/z/512209.html