利用 pprof 分析 Filebeat 的 CPU 使用率过高
通过 pprof 调试 Filebeat因为 Filebeat 是用 Go 语言实现的,而 Go 语言本身的基础库里面就包含 pprof 这个功能极其强大的性能分析工具,因此,在 7.x 版本中,Beats 家族的工具,都提供了以下参数,方便用户在出现问题的时候,对应用进行调试: 12345678--cpuprofile FILE Writes CPU profile data to the specified file. This option is useful for troubleshooting Filebeat.-h, --help Shows help for the run command.--httpprof [HOST]:PORT Starts an http server for profiling. This option is useful for troubleshooting and profiling Filebeat.--memprofile FILE Writes memory profile data to the s...
