Uncategorized

jmx jstatd remote debug configuration in JVM

To start the jstatd daemon, follow these steps:

Note : Close all the java based applications before starting jstatd.

Create a permissions policy (for example, jstatd.all.policy) that contains the following contents:

grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; };

Start the jstatd daemon, and specify the policy file and the port that you want to use. The daemon is found in the Java Development Kit (JDK) bin directory. Note: The location for that directory depends on the operating environment.
For UNIX operating environments, specify the following:

JAVA_HOME/bin/jstatd -p 1199 -J-Djava.security.policy=jstatd.all.

For Windows operating environments, specify the following:

JAVA_HOME\bin\jstatd -p 1199 -J-Djava.security.policy=jstatd.all.policy

Remote Monitoring via JMX

To monitor a Java virtual machine (JVM) via JMX, follow these steps:

Add the following arguments to the target JVM:

-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=4090

Restart the JVM so that the new arguments take effect.
Verify that the JMX port (4090 in this example) is open and listening. Once you verify that the port is open and listening, you can connect to the port for remote monitoring.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s