Java : how to check current Perm / PermGen Size?

后端 未结 4 1062
星月不相逢
星月不相逢 2021-01-31 19:50

Yesterday when I was running the WebLogic Application Server 11g installer, I encountered a OutOfMemory error, so I Googled for the answer:

java -Xms256m -Xmx512         


        
4条回答
  •  悲哀的现实
    2021-01-31 20:42

    Another way to get PermGen information is:

    kill -3 JAVA_PID
    

    It gets thread dump and memory information (including PermGen). Example output:

    PSPermGen       total 68864K, used 68808K [0x000000009c600000, 0x00000000a0940000, 0x00000000a1800000)
    

    For some reason jinfo did not work when I needed it. It returned:

    Unable to open socket file: target process not responding or HotSpot VM not loaded
    

    There are few possible causes of the above and one of them may be explicit declaration of the java.io.tmpdir as described at https://www.permeance.com.au/web/terry.mueller/home/-/blogs/unable-to-open-socket-file-target-process-not-responding-or-hotspot-vm-not-loaded

提交回复
热议问题