VisualVM unable to sampler memory

前端 未结 10 1775
甜味超标
甜味超标 2021-02-03 23:18

I have a tomcat instance with the JMXRemote parameter configured. The local VisualVM is able to get a sampler on CPU, however, not for Memory. The memory button is grayed out wi

10条回答
  •  [愿得一人]
    2021-02-03 23:33

    Firstly, JMX should be enabled. Add the linked command line environment variables necessary to activate JMX if you haven't.

    The environment variable CATALINA_TMPDIR should be set to match the JVisualVM as seen in the "System properties" tab of the Local > VisualVM. You can open this by double clicking on the "VisualVM" labeled entry in the Applications pane on the left.

    Environment variables can be set by searching for environment, "edit environment variables for your account". New... > Enter a name and value.

    If you would like the temporary directory of VisualVM to be somewhere else, you'll have to launch VisualVM from the command line and add an argument.

    C:\Program Files\Java\jdk1.8.0_65\bin>jvisualvm.exe -J-Djava.io.tmpdir=C:\Users\You\Temp
    

提交回复
热议问题