Identify Java jdwp Debugger Assigned (Ephemeral) Port

后端 未结 2 696
感情败类
感情败类 2021-01-03 03:18

I am using the following JVM parameters to start-up a JVM with the hostpot debugger.

-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=0
2条回答
  •  误落风尘
    2021-01-03 03:52

    Maybe something you could start with.

    netstat -tlnp
    

    This gives you a list of all processes listening on a local TCP port. For example:

    tcp    0    0 0.0.0.0:35688     0.0.0.0:*     LISTEN   26733/java
    
    35688 - the ephemeral port
    java  - the program name which is listening
    26733 - the PID of the process 
    

    If you need a finer granularity of the java processes you could use ps to gather informations about the process.

    ps x -p 26733

    could return something like

    26733 pts/1 0:00 java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=0 Scratch

提交回复
热议问题