jconsole [ options ] jconsole [ options ] pid jconsole [ options ] host:port
jconsole is a graphical interface to the memory, thread, class loading, and other monitoring tools provided by the java.lang.management package. It can monitor one or more local or remote Java processes. Processes can be monitored only if started with special system properties set. To allow a Java VM to be monitored locally, start it with:
% jconsole -Dcom.sun.management.jmxremote=true
To allow a Java VM to be monitored remotely, start it with:
% jconsole -Dcom.sun.management.jmxremote.port= port
where port is the remote port to which jconsole will connect.
You may start jconsole with no local or remote process specified and use its Connection menu to establish connections. This is the only way to connect jconsole to more than one Java process.
To connect jconsole to a local process when it starts up, simply list the process id on the command line. See jps to determine process ids.
To connect jconsole to a remote process when it starts up, specify the hostname and port number on the command line. The port should be the same as that specified by the com.sun.management.jmxremote.port system property of the target process.