如何查看垃圾收集日志?

h43kikqp  于 2021-06-21  发布在  Storm
关注(0)|答案(1)|浏览(346)

我了解到垃圾收集日志对于解决性能问题非常有用,但我无法查看它们。
我在yaml中添加了以下内容,其中xloggc属性设置为可以找到我的worker/supervisor/etc日志的同一路径:

worker.childopts: "-XX:+PrintCGTimeStamps
-XX:+PrintGCTimeStamps
-Xloggc: /mycomp/log/storm/worker%ID%-jvm-gc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=1M
-XX:+PrintGCDateStamps
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintGCApplicationConcurrentTime"

我将此添加到代码中,为拓扑设置worker.childopts: conf.put(Config.WORKER_CHILDOPTS, config.getWorkerChildopts()); 在storm ui中,我可以看到worker.childopts设置正确。但是我在指定的目录中找不到gc日志。有什么建议吗?

bvjveswy

bvjveswy1#

尝试设置 topology.worker.childopts 相反。
通过:https://community.hortonworks.com/articles/550/unofficial-storm-and-kafka-best-practices-guide.html

相关问题