When my Java application (Oracle JVM v1.6.0) turned on the GC log, it usually outputs the following output:
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 way to generate this output periodically during application startup? I know How to use programmatic memory access through JMX? , but honestly, I hope for a shortcut or reimplementation of the code that generates the above. For example, is it possible that sending a kill signal to the JVM will lead to the output of the above output?
source share