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
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