When my Java application (Oracle JVM v1.6.0) has GC logging enabled, it typically prints the following output on exit:
PSYoungGen total 6429824K, used 5483163K [0x0000000640000000, 0x0000000800000000, 0x0000000800000000)
eden space 5483456K, 99% used [0x0000000640000000,0x000000078eaa6cc0,0x000000078eaf0000)
from space 946368K, 0% used [0x00000007c63d0000,0x00000007c63d0000,0x0000000800000000)
to space 910208K, 0% used [0x000000078eaf0000,0x000000078eaf0000,0x00000007c63d0000)
ParOldGen total 3145728K, used 3145724K [0x0000000580000000, 0x0000000640000000, 0x0000000640000000)
object space 3145728K, 99% used [0x0000000580000000,0x000000063ffff3a0,0x0000000640000000)
PSPermGen total 57984K, used 57686K [0x000000057ac00000, 0x000000057e4a0000, 0x0000000580000000)
object space 57984K, 99% used [0x000000057ac00000,0x000000057e455ae0,0x000000057e4a0000)
Is there a method to generate this output periodically during the application run? I am aware of How do I access memory usage programmatically via JMX? but frankly I'm hoping for a shortcut vs. re-implementing the code that generates the above. For example, perhaps sending a kill signal to the JVM will force the above output?