AppDynamics Application Intelligence Platform

3.9.x Documentation

PDFs

Learn by Watching

Doc Maps

This topic helps you understand how to configure and use object instance tracking. For more information about why you may need to configure this, see Troubleshoot Java Memory Thrash.

Prerequisites for Object Instance Tracking

  • Object Instance Tracking can be used only for Sun JVM v1.6.x and later. 
  • If you are running with the JDK then tools.jar will probably be setup correctly, but if you are running with the JRE you must add tools.jar to JRE_HOME/lib/ext and restart the JVM for this feature to start working. You can find the tools.jar file in JAVA_HOME/lib/tools.jar.
  • In some cases In some cases you might also need to copy libattach.so (Linux) or attach.dll (Windows) from your JDK to your JRE. 
  • Depending on the JDK version, you may also need to specify the classpath as shown below (along with other -jar options).

Specifying the Classpath

When using a JDK tool, set the classpath using the -classpath option.

Classpath for application only

This sets the classpath for the application only. For example:

On Windows

java -classpath <complete-path-to-tools.jar>;%CLASSPATH% -jar myApp.jar

OR

On Unix

java -Xclasspath/a:<complete-path-to-tools.jar> -jar myApp.jar

Classpath for entire environment

Alternatively, you can set the CLASSPATH variable for your entire environment. For example:

 On Windows

SET CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar

On Unix

CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar

 

Starting Object Instance Tracking

To start object instance tracking on a node

1. In the left navigation pane, click Servers -> App Servers -> <tier> -> <node>. The Node Dashboard opens.

2. Click the Memory tab.

3. Click the Object Instance Tracking subtab.

4. Click ON.

AppDynamics begins to automatically track the top 20 application classes and the top 20 system (core Java) classes in the heap.

Tracking Specific Classes

Check against the required set of classes to enable instance tracking for each set. For improved performance, only the top 20 application classes and the top 20 system (core Java) classes in the heap are tracked automatically.

Use the Configure Custom Classes to Track option to specify instances of specific classes.

Classes configured here are only tracked if their instance count is among the top 1000 instance counts in the JVM.

To track instances of custom classes

1. In the left navigation pane, click Servers -> App Servers -> <tier> -> <node>. The Node Dashboard opens.

2. From the Object Instance Tracking subtab, click Configure Custom Classes To Track on the rightmost corner of the window.

3. In the Object Instance Tracking - Define Custom Classes to Track section for the tier, click Add.

4. In the Create New Instance Tracker window, check Enabled.

5. Enter the fully-qualified class name of the class to track.

6. Click Save.

You can also access this configuration page by selecting Configuration -> Instrumentation -> Memory Monitoring.

You can edit or delete the object tracing configuration after it has been created.

Learn More