Java VisualVM
is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications)
while they are running on a Java
Virtual Machine (JVM
).
Java
VisualVM organizes JVM data that is retrieved by the
Java
Development Kit (JDK) tools and presents the information in a way that enables
you to quickly view data on multiple Java
applications.
You can view data on local applications and applications that are running on remote hosts. You can also capture data about the JVM software and save the data to your local system, and view the data later or share the data with others.
1 Using JVisualVM
To monitor a remote server using JVisualVM you need to setup a SOCKS proxy connection:
ssh -D 9696 user@remotemachine.com
Then start the local monitor application using that connection. For example, given the server IP address and it's configured JMX port,
jvisualvm -J-DsocksProxyHost=localhost -J-DsocksProxyPort=9696 \ --openjmx <REMOTE_SERVER_IP>:<JAVA_JMX_PORT>