jcmd, windows x64: cannot see other processes?

Thomas Stüfe thomas.stuefe at gmail.com
Tue Apr 10 09:26:01 UTC 2018


Hi Alan,

On Mon, Apr 9, 2018 at 5:57 PM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:

> On 09/04/2018 16:50, Thomas Stüfe wrote:
>
>> So, I found that I can attach with jcmd just fine, just the process
>> listing does not work.
>>
>> I can only attach via pid, not via command name, which I think stems from
>> the same error.
>>
>> Does anyone have any idea? Should I open a bug report?
>>
>>
>> Its this something to do with the value of java.io.tmpdir? Are the
> running VMs using their own temp dir?
>
>
No, this is a very simple setup.

On my local machine, I build jdk-hs from the current tip. Then I run a
simple java HelloWorld, without any options given. The program just waits
on a keystroke.

$ ../../openjdk/jdk-hs/output-fastdbg/images/jdk/bin/java HelloWorld

I start jcmd from the same image. Again, no options.

$ ./images/jdk/bin/jcmd
248472 jdk.jcmd/sun.tools.jcmd.JCmd

And I only see the jcmd process itself.

Note that in this example I run from cygwin shells, but the same error
happens when running from cmd.exe.

Also note that I also have other java processes running on the same box, eg
an Eclipse instance using openjdk9. It does not show up in the jcmd process
listing either.

I can, however, attach to my HelloWorld process via pid:

$ ./images/jdk/bin/jcmd 248204 help
248204:
The following commands are available:
VM.log
VM.native_memory
.....

But unsurprisingly not via name:

$ ./images/jdk/bin/jcmd HelloWorld help
Could not find any processes matching : 'HelloWorld'

I am pretty sure this used to work on my machine some time ago.

Thanks, Thomas



-Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180410/204d795b/attachment.html>


More information about the serviceability-dev mailing list