How to find out the JVM port in linux?

2

I have linux server running a JRE 1.7 and I need to use VisualVM to monitor the performance of the applications running on it.

VisualVM uses JMX to connect to the linux host but it expects something like

<hostname>:<port>

At first I thought it was the ssh 22 port, but I was wondering if it's the JVM port on the server.

How do I find out which port the JVM is running on?

    
asked by anonymous 05.07.2017 / 14:18

1 answer

3

Run the command netstat -tlnp , see the result:

We have the protocol, such as TCP / UPD, the listening IP and the port. In the end we have the PID and also which program is running.

    
05.07.2017 / 14:53