How to find dynamically allocated JMX port when port is 0

For a java application, when jmx is turned on and the port is set to 0, the port will be dynamically allocated:

-Dcom.sun.management.jmxremote.port=0 

What is the best way to find out which port is assigned? I managed to find it using ps and pfiles on Solaris, hoping it was easier to find it (programmatically)

Is there also a better way to assign dynamic jmx ports for java applications in one window and track them?

+4
source share

Source: https://habr.com/ru/post/1498635/


All Articles