0N/AVerboseGC demonstrates the use of the java.lang.management API to
0N/Aprint the garbage collection statistics and memory usage remotely
0N/Aby connecting to a JMX agent with a JMX service URL:
0N/A service:jmx:rmi:///jndi/rmi://<hostName>:<portNum>/jmxrmi
0N/Awhere <hostName> is the hostname and <portNum> is the port number
0N/Ato which the JMX agent will be connected.
0N/A
0N/ATo run the VerboseGC demo
0N/A
0N/A(1) Start the application with the JMX agent - here's an example of
0N/A how the Java2D is started
0N/A
0N/A java -Dcom.sun.management.jmxremote.port=1090
0N/A -Dcom.sun.management.jmxremote.ssl=false
0N/A -Dcom.sun.management.jmxremote.authenticate=false
0N/A -jar <JDK_HOME>/demo/jfc/Java2D/Java2Demo.jar
0N/A
0N/A This instruction uses the Sun's built-in support to enable a JMX agent.
0N/A You can programmatically start a JMX agent with the RMI connector
0N/A using javax.management.remote API. See the javadoc and examples for
0N/A javax.management.remote API for details.
0N/A
0N/A(2) Run VerboseGC
0N/A
0N/A java -jar <JDK_HOME>/demo/management/VerboseGC/VerboseGC.jar localhost:1090
0N/A
0N/AThese instructions assume that this installation's version of the java
0N/Acommand is in your path. If it isn't, then you should either
0N/Aspecify the complete path to the java command or update your
0N/APATH environment variable as described in the installation
0N/Ainstructions for the Java(TM) SDK.