How to find the JVM port in linux?

Asked

Viewed 389 times

2

I have a linux server running a JRE 1.7 and I need to use Visualvm to monitor the performance of 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 port 22, but searching I read that it is the JVM port on the server.

How do I find the door the JVM is running?

  • In Windows environment is used the PID, would not be the same for Linux environment ?

  • Run the netstat -tlnp command, you will see the list of open ports

  • @Brunorigolon Don’t you think this can be an answer instead of a comment?

  • 1

    @Fláviogranato, was waiting generating the image to show the output of the command.

1 answer

3


Execute the command netstat -tlnp, see the result:

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

Saída do comando netstat -tlnp

  • Thanks is what you need

Browser other questions tagged

You are not signed in. Login or sign up in order to post.