[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: jcmd, windows x64: cannot see other processes?
From:       Thomas_Stüfe <thomas.stuefe () gmail ! com>
Date:       2018-04-10 9:26:01
Message-ID: CAA-vtUy-CcJcH4zSmbepr+eovqWQ9+uHVQ3_oMkgo4AaN114NQ () mail ! gmail ! com
[Download RAW message or body]

Hi Alan,

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

> On 09/04/2018 16:50, Thomas St=C3=BCfe 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 fro=
m
>> 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
>

[Attachment #3 (text/html)]

<div dir="ltr">Hi Alan,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, \
Apr 9, 2018 at 5:57 PM, Alan Bateman <span dir="ltr">&lt;<a \
href="mailto:Alan.Bateman@oracle.com" \
target="_blank">Alan.Bateman@oracle.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 09/04/2018 16:50, Thomas \
Stüfe wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> So, I found that I \
can attach with jcmd just fine, just the process listing does not work.<br> <br>
I can only attach via pid, not via command name, which I think stems from the same \
error.<br> <br>
Does anyone have any idea? Should I open a bug report?<br>
<br>
<br>
</blockquote></span>
Its this something to do with the value of java.io.tmpdir? Are the running VMs using \
their own temp dir?<span class="gmail-HOEnZb"><font color="#888888"><br> \
<br></font></span></blockquote><div><br></div><div>No, this is a very simple \
setup.</div><div><br></div><div>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.</div><div><br></div><div><div>$ \
../../openjdk/jdk-hs/output-fastdbg/images/jdk/bin/java \
HelloWorld<br></div></div><div><br></div><div>I start jcmd from the same image. \
Again, no options.  </div><div><br></div><div><div>$ \
./images/jdk/bin/jcmd</div><div>248472 \
jdk.jcmd/sun.tools.jcmd.JCmd</div><div><br></div></div><div>And I only see the jcmd \
process itself.</div><div><br></div><div>Note that in this example I run from cygwin \
shells, but the same error happens when running from \
cmd.exe.</div><div><br></div><div>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.</div><div><br></div><div>I can, however, attach \
to my HelloWorld process via pid:</div><div><br></div><div><div>$ \
./images/jdk/bin/jcmd 248204 help</div><div>248204:</div><div>The following commands \
are available:</div><div>VM.log</div><div>VM.native_memory</div><div>.....</div></div><div><br></div><div>But \
unsurprisingly not via name:</div><div><br></div><div><div>$ ./images/jdk/bin/jcmd \
HelloWorld help</div><div>Could not find any processes matching : \
&#39;HelloWorld&#39;</div><div><br></div></div><div>I am pretty sure this used to \
work on my machine some time ago.</div><div><br></div><div>Thanks, \
Thomas</div><div><br></div><div><br></div><div><br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
                rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font \
                color="#888888">
-Alan<br>
</font></span></blockquote></div><br></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic