JDK 11
Safepoints and Garbage Collector log file analyzer
Whole page is under heavy development, it is tested mostly on G1/Parallel GC on JDK 11. If you have any issues with your log file send me message to ks@gclogs.com.
Current limitations:
- Logs from JDK 11, 12, 13 - works with flags below , tested on Parallel, CMS and G1.
- Logs from JDK 9, 10 - should work.
- Logs from JDK 8 and below - experimental ( no GC log support , only safepoint, charts and stas are not accurate, because log file style sucks).
- Max 33MB file (after compression).
- For JDK 11+ decorators: level,tags,time,uptime are needed, check sample Xlog configuration below.
- You can add many log files in one zip/7z archive. The files will be ordered by first line timestamp.
- There is no exception handling at all :)
Upload file:
Upload logs from clipboard:
Upload logs with curl:
Compress your logs:
zip -r logs.zip logs_file.log*
Make sure your logs are not bigger than 33MB after compression.
Upload logs archive to the server:
curl -X POST --form file=@./logs.zip http://gclogs.com/enqueue
In response you'll receive link to your report. The report will be available for 3 minutes.
Kubernetes
kubectl exec -t <pod where logs are located> -- curl -X POST --form
file=@<path to your logs on container> http://gclogs.com/enqueue
Remember that curl command must be available in the
container
Recommended JVM arguments
-Xlog:codecache=info,
codecache+sweep*=trace,
class+unload,
class+load,
os+thread,
safepoint,
gc*,
gc+stringdedup=debug,
gc+ergo=trace,
gc+age=trace,
gc+phases=trace,
gc+humongous=trace,
jit+compilation=debug
:file=/tmp/app.log
:level,tags,time,uptime
:filesize=104857600,filecount=5
-Xlog:safepoint,
gc*,
gc+heap=trace,
gc+age=trace,
gc+phases=trace,
gc+humongous=trace
:file=/tmp/app.log
:level,tags,time,uptime
-XX:+PrintSafepointStatistics
-XX:PrintSafepointStatisticsCount=1
-XX:LogFile=/tmp/app.log
-XX:+LogVMOutput
Unified logger, changing logs at runtime example:
sudo -u JVM_USER jcmd `pgrep -x java` VM.log
output="file=/PATH/TO/gc.log"
output_options="filesize=104857600,filecount=5"
what="codecache=info,codecache+sweep*=trace,class+unload,class+load,os+thread,safepoint,gc*,gc+stringdedup=debug,gc+ergo=trace,gc+age=trace,gc+phases=trace,gc+humongous=trace,jit+compilation=debug"
decorators="level,tags,time,uptime,pid