#java #cli #gc #logs #analyze #java-8 #g1gc

bin+lib gclog

分析 JDK8 gc 日志的工具

1 个不稳定版本

0.2.1 2023年11月13日

#25 in #analyze

Apache-2.0

115KB
2K SLoC

gclog

gclog 是一个简单快速的工具,用于读取和分析 Java 8 的 gc 日志

状态

目前处于 Alpha 阶段,仅支持 G1GC 和 JDK8

快速入门

cargo install gclog
gclog ./gc.log

gclog 0.2.1-rustc 1.71.0 (8ede3aae2 2023-07-12)
GC Summary:
--------
OpenJDK 64-Bit Server VM (25.372-b07) for bsd-aarch64 JRE (Zulu 8.70.0.23-CA-macos-aarch64) (1.8.0_372-b07), built on Apr 18 2023 01:36:28 by "zulu_re" with gcc Apple LLVM 12.0.0 (clang-1200.0.32.28)
Total System RAM:    8.39 gb
collector:           G1GC
target pause millis: 500
region size:         1.00 mb
max heap:            2.00 gb
initial heap:        0.12 gb
max direct memory:   2.00 gb
flags:
-XX:InitialHeapSize=134217728
-XX:MaxGCPauseMillis=500
-XX:MaxHeapSize=2147483648
-XX:+PrintAdaptiveSizePolicy
-XX:+PrintGC
-XX:+PrintGCDateStamps
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintReferenceGC
-XX:+UseCompressedClassPointers
-XX:+UseCompressedOops
-XX:+UseG1GC

Max Pause:
--------
Timestamp: 2023-11-13T08:27:06.0Z
Pause Time 10 milliseconds
Pause Type G1 Evacuation Pause
+-------------------------------+--------------+------------------+-----------+-----------+-----------+-----------+
| GC                            | Total Pauses | Total Pause Time | Min Pause | P50 Pause | P99 Pause | Max Pause |
+-------------------------------+--------------+------------------+-----------+-----------+-----------+-----------+
| G1 Evacuation Pause - (young) |      30      |       0.21       |   0.00    |   0.01    |   0.01    |   0.01    |
+-------------------------------+--------------+------------------+-----------+-----------+-----------+-----------+

依赖项

~6–16MB
~212K SLoC