Monitor the Performance of an Application Server

Oracle Application Performance Monitoring lets you view details about an Application Server.

In the Oracle Application Performance Monitoring Home Page, the AppServers tile displays the top five Application Servers. Click the Application Server that you want to view the details for. If the Application Server you are looking for is not among the top five:
  1. In the left navigation pane, click AppServers to see a list of AppServers.
    All the Application Servers that are currently running are displayed here.
  2. Click the Application Server for which to view the details.
    You can view graphs of memory and CPU usage, garbage collection, response time, load and thread pool.
  3. Click the Metrics tab to view metrics of the application server over a selected time range.
  4. Click the Server Requests to view a list of server requests being handled by the application server. Click a server request to view its summary.
  5. Click the Database tab to view details of the SQL calls.
  6. Click Thread Profiler to view a list of all thread profilers belonging to this application server. You can click on a thread profiler to view its summary.
  7. In the quick menu on the top right corner, click Start Thread Profiler to capture thread data (like stack snapshots, thread memory allocation, CPU consumption, blocked time) for a small duration of time that you can specify.
  8. From the quick menu, click View Log to view log events for the application server.
    The Log Visual Analyzer displays the error logs for the Application Server. You can change the time range and view data accordingly.

Collect Thread Profiler Data for an Application Server

You can collect detailed data that are not generally captured by Oracle Application Performance Monitoring through the Thread Profiler.

Thread Profiler can collect detailed data about an application server for a small duration of time. It can collect a variety of data like thread data (stack snapshots, thread memory allocation, CPU consumption, blocked time), Garbage Collection data, JVM parameters, and System Parameters. This data can be used to understand JVM activities or threads based on CPU or Memory consumption.

You can have a maximum of 5 Thread Profiler schedules defined for an APM agent at a time. In case you already have five thread profiler schedules, ensure you delete an old schedule before creating another one.

To define a thread profiler schedule:

  1. From the AppServer details page of the required Application Server, click the quick menu icon, and select Start Thread Profiler.

    OR

    From the left navigation menu, select Diagnostic Snapshots, select Thread Profiles and click Start Thread Profiler.

  2. In the Thread Profiler dialog box, specify the details:
    • Specify a Name for the thread profiler, if you want to change the default name.

    • Select an AppServer if it is not already selected.

    • Specify a Duration for the profiler. You can choose up to 5 minutes.

    • Optionally, provide a Description for the profiler.

  3. Click Start Profiler.
    You can view this Thread Profiler from the Thread Profiles page. You can also view the thread profile View Diagnostic Snapshots option from the quick menu in the respective AppServer details page.

Collect JFR Data for an Application Server

Your Oracle Application Performance Monitoring Java agent can collect diagnostic data using the Java Flight Recorder (JFR).

Prerequisites:

  1. JFR dump is supported only on HotSpot JDKs (Sun, JRockit, Oracle JDKs), and not on IBM JDK.

  2. JFR dumps can be analyzed through JMC (Java Mission Control). For Oracle JDK 1.7.0_04 and later (but earlier than JDK 1.8.0_40), JVM process should be run with the following Java options:

    -XX:+UnlockCommercialFeatures -XX:+FlightRecorder

    These Java options are not required for JDK 1.8.0_40 and later.

  3. Before you can collect JFR data, ensure that the JFR is running.

To collect JFR data:

  1. From the AppServer details page of the required Application Server, click the quick menu icon, and select Dump JFR.

    OR

    From the left navigation menu, select Diagnostic Snapshots, select JFR Dumps and click Dump JFR.

  2. In the Dump JFR dialog box, specify the details:
    • Specify a Name for the JFR dump, if you want to change the default name, which is a time stamp.

    • Optionally, click Add Description and provide a description for the JFR dump.

    • Select an AppServer if it is not already selected.

  3. Click Dump JFR.

    The JFR dump collection starts in the next harvesting cycle of the APM agent (in about a minute), and it takes a few minutes to perform this operation.

    You can view the JFR Dump from the JFR Dumps page. You can also view the JFR dump from the View Diagnostic Snapshots option from the quick menu in the respective AppServer details page.

Viewing and Downloading JFR Dump

To view and download JFR dump:
  1. From the left navigation menu, select Diagnostic Snapshots, and select JFR Dumps.
  2. To download the .jfr file, click the download button at the right end of the respective JFR Dump row.
  3. To view the JFR Summary, click the name of the JFR Dump. The JFR Summary page is displayed.
  4. In the JFR Summary page, click the download button to download the JFR Report.

Disabling JFR Dump

To disable JFR dump:
  1. Navigate to the folder apmagent/config/<AppServer Name>, and edit the Properties.json file.
  2. Set the static property oracle.apmaas.agent.deepdive.disableJFR to true. To enable, set the property to false.
  3. Restart the application server.

Collect Class Histogram for an Application Server

Your Oracle Application Performance Monitoring Java agent can collect Class Histogram data for analysis of the performance of your application server.

Prerequisites:

  1. Class Histogram is supported only on Sun and JRockit JDKs.
  2. Ensure that tools.jar is set in the Java classpath.

To collect Class Histogram for an application server:

  1. From the AppServer details page of the required Application Server, click the quick menu icon, and select Class Histogram.

    OR

    From the left navigation menu, select Diagnostic Snapshots, select Class Histograms and click Create Class Histogram.

  2. In the Create Class Histogram screen, specify the details:
    • Specify a Name for the Class Histogram if you want to change the default name, which is a time stamp.

    • Optionally, click Add Description and provide a description for the Class Histogram.

    • Select an AppServer if it is not already selected.

  3. Click Create Class Histogram.

    The Class Histogram is created in the next harvesting cycle of the APM agent (in about a minute), and it takes a few minutes to perform this operation. Once the Class Histogram is created, it is listed in the Class Histograms page, with the class count details. Click the name of the Class Histogram to view the summary.

    You can view the Class Histogram from the Class Histograms page, and also from the quick menu in the respective AppServer details page.

Disabling Class Histogram

To disable Class Histogram:
  1. Navigate to the folder apmagent/config/<AppServer Name>, and edit the Properties.json file.
  2. Set the static property oracle.apmaas.agent.deepdive.disableClassHistogram to true. To enable, set the property to false.
  3. Restart the application server.

Collect Heap Dump for an Application Server

Your Oracle Application Performance Monitoring Java agent can collect Heap Dump data for analysis of the performance of your application server.

Prerequisites:

  1. Heap Dump can be taken on Sun (V1.6 or later), JRockit and IBM (v1.6 and above) JDKs.

  2. In case of IBM 1.6 JDK, set the environment variable IBM_HEAPDUMPDIR to the directory in which the Heap Dump has to be stored. If this variable is not set, the Heap Dump will be stored in the directory from where the application server is running.

To collect Heap Dump:

  1. From the AppServer details page of the required Application Server, click the quick menu icon, and select Take Heap Dump.

    OR

    From the left navigation menu, select Diagnostic Snapshots, select Heap Dumps and click Take Heap Dump.

  2. In the Take Heap Dump screen, specify the details:
    • Specify a Name for the Heap Dump if you want to change the default name, which is a time stamp.

    • Optionally, click Add Description and provide a description for the Heap Dump.

    • Select an AppServer if it is not already selected.

  3. Click Take Heap Dump.

    The Heap Dump collection starts in the next harvesting cycle of the APM agent (in about a minute), and it takes a few minutes to perform this operation. The path where the heap dump file is stored is displayed after the heap dump is taken.

    You can view the Heap Dump from the Heap Dumps page, and also from the quick menu in the respective AppServer details page.

Disabling Heap Dump

To disable Heap Dump:
  1. Navigate to the folder apmagent/config/<AppServer Name>, and edit the Properties.json file.
  2. Set the static property oracle.apmaas.agent.deepdive.disableHeapDump to true. To enable, set the property to false.
  3. Restart the application server.

Integrate Application Performance Monitoring Events with JFR

Application Performance Monitoring events are integrated with JFR by default.

APM Events are integrated with JFR using Java Mission Control (JMC). The data captured by the APM Agent can then be viewed on JMC, thereby providing more insight into all APM Events.

Prerequisites:
  • Ensure that the JFR support is set to ON.

  • A JFR recording should be running.

  • In the Properties.json file located in the apmagent/AdminServer folder, ensure that the following property is set to TRUE:

    oracle.apmaas.agent.deepdive.jfrEvent
    By default, this property is set to TRUE, which means that the JFR- APM Event integration is enabled.

To view Application Performance Monitoring Events in JMC:

  1. If the above prerequisites are met, once you deploy the APM Java Agent, you will see the complete list of APM Events when you start a recording.
    You can enable all or specific events from the list. Follow JMC documentation for instructions on how to enable events.
  2. Once you have a recording of the JFR, you can see the APM events that you have selected, and data about those events in the JMC UI.

    Various tabs in JMC provide details on APM Events, and metrics about APM entities.