JConsole can't find process

前端 未结 8 1538
北恋
北恋 2021-02-18 20:50

I tried to run JConsole to analyze the memory used by a running process, but JConsole doesn\'t show me processes even though I am absolutely sure that one is running (in additio

相关标签:
8条回答
  • 2021-02-18 21:14

    This happens when %TMP% value is different for monitored JVM and the monitoring tool (JConsole/JMC/Java Mission Control, maybe even VisualVM). This may be the standard scenario with Cygwin (at least in my case: Cygwin+Babun) Easiest solution is to set value of the TMP environment variable to the default value used by Windows, at least in scope of shell launching the JVM.

    0 讨论(0)
  • 2021-02-18 21:15

    If you are running jconsole on windows - simply :

    1. Find jconsole.exe
    2. Right click it
    3. Select run as administrator.
    0 讨论(0)
  • 2021-02-18 21:17

    In my case, removal of hsperfdata_USERNAME directory (in %TMP% directory) and closing all the JVMs has helped.

    0 讨论(0)
  • 2021-02-18 21:22

    I have the same problem. But if I explicitly specify the PID, as in jconsole 1234, jconsole is able to analyze the process.

    0 讨论(0)
  • 2021-02-18 21:25

    at window prompt, run echo %TMP%, it will give you default temp dir. Go to that directory and find directory named hsperfdata_user where user is your login. This is directory to store your process id. Any new process you created such as java application will have a new file named by process id. Jconsole will pick up the process ids from this directory. If you cannot create a file in this directory, that means you need change permission to allow write. Once done that, start a new java application to see if new process id file is in the dir. Once confirmed, start jconsole

    0 讨论(0)
  • 2021-02-18 21:26

    You have to start jconsole with the same user as the process you want to analyze is started by.

    0 讨论(0)
提交回复
热议问题