Enabling GC Activity Logging Without Restarting the JVM


Enabling Garbage Collection (GC) activity logging normally requires a restart of the JVM hosting the service.

Below steps explains how GC logging can be enabled without requiring a JVM restart for a chosen service.

Assuming user1 is the owner of the running JVM process, and 10274 is the PID (Process ID) of the JVM you are targeting, you can get the GC logging info from it by using:

sudo -u user1 /usr/java/default/bin/jinfo -flag +PrintGC 10274
sudo -u user1 /usr/java/default/bin/jinfo -flag +PrintGCTimeStamps 10274
sudo -u user1 /usr/java/default/bin/jinfo -flag +PrintGCDetails 10274

Note: The output is stdout

Comments

Popular posts from this blog

Steps to Analyze AWR Report in Oracle

Vmstat Output explained

Verifications and Error Handling in LoadRunner *Web_reg_find and Web_reg_save_param*