This section provides a tutorial example on how to run 'jconsole' to connect to a JMX agent running on a remote machine, and how to see memory usage detail information.
If you follow the tutorial presented in the previous section,
the PrimeNumberSeeker.java is running in a JVM with the remote JMX agent turned on waiting
for remote connections at the port: 6789.
Now we can run "jconsole localhost:6789" to connect to this JVM remotely
to monitor how my PrimeNumberSeeker.java is running:
1. Run "jconsole localhost:6789". "jconsole" connects to my Java application correctly.
The Java Monitoring & Management Console shows up.
2. Click the Memory tab, the memory usage detail information show up
as shown in this picture: