How to check heap usage of a running JVM from the command line?

前端 未结 4 1297
忘了有多久
忘了有多久 2020-12-12 21:34

Can I check heap usage of a running JVM from the commandline, I mean the actual usage rather than the max amount allocated with Xmx.

I need it to be commandline beca

4条回答
  •  一向
    一向 (楼主)
    2020-12-12 21:43

    You can use jstat, like :

     jstat -gc pid
    

    Full docs here : http://docs.oracle.com/javase/7/docs/technotes/tools/share/jstat.html

提交回复
热议问题