I am trying to monitor native memory of tomcat using jcmd but getting following exception:
Command: jcmd 14533<pid of tomcat> VM.native_memory summary
I have installed 2 jdk's jdk-11 AND jdk-8.
Tomcat is running by jdk-8 and jcmd used jdk-11 then i got following exception:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file /proc/31752/root/tmp/.java_pid31752: target process 31752 doesn't respond within 10500ms or HotSpot VM not loaded
    at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:100)
    at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
    at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
    at jdk.jcmd/sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:114)
    at jdk.jcmd/sun.tools.jcmd.JCmd.main(JCmd.java:98)
I attched -XX:+StartAttachListener with java process but it didn't work.