Contents

List of Figures

List of Tables

Title and Copyright Information

Preface

Intended Audience

Documentation Accessibility

1 Introduction to Application Diagnostics for Java

Overview

Low Overhead Monitoring with Deep Diagnostics

Easy Installation and Deployment

Real-Time JVM Visibility

Cross-Tier Transaction Tracing

Powerful Heap Analysis Tools

JVM Pooling

Real-time and Historical Diagnosis

JVM Tracing

System Architecture

Software and Hardware Requirements

2 Installing the Oracle AD4J Console

Installing the AD4J Console on Unix

Prerequisites

Installation Procedure

Collecting Database Repository Details

Extracting Files

Running the Configuration Script

Understanding Console Parameters

Starting Up and Initializing the Console

Specifying the Database Connection Details

Creating the Database Tables

Viewing JVM Console Diagnostics

Uninstalling the AD4J Console on Unix

Installing the AD4J Console on Windows

Prerequisites

Installation Procedure

Running the jamserv-win.msi File

Selecting the Installation Location

Setting the Console Parameters

Specifying the Port Information

Uninstalling the AD4J Console on Windows

Post-Installation Tasks

Accessing the AD4J Console for the First Time

Setting Up the Console and Diagnostics

Deploying the Agent on Monitored JVMs and Databases

3 Installing the AD4J Agent

Before you Start

Customizing the Oracle AD4J Agent

Web.XML Contents

Installing the AD4J Agent on Oracle Application Server 10g

Deploying the Agent WAR

Installing the AD4J Agent on Oracle WebLogic

Deploying the Agent WAR

Installing the AD4J Agent on Apache Tomcat

Deploying the Agent WAR

Installing the Oracle AD4J Agent on Apache JServ

Setting Up the CLASSPATH - Automatic Mode

Setting Up the CLASSPATH - Manual Mode

Loading the Servlet at Startup Time

Installing the Oracle AD4J Agent on IBM WebSphere

Deploying the Agent WAR

Installing the Oracle AD4J Agent on Standalone Java Applications

Original Java Call

Modified Java Call with Oracle AD4J Agent

Sample Configuration

Adding the Oracle AD4J Agent and Libraries, Classes to Classpath

Target Parameters

Installing the Database Agent

Prerequisites

Register the Database in the Setup Tab

Download the DB Agent for Your Platform from the Console

Download the Agent for Your Database Platform

4 Setting Up and Using the AD4J Console

Oracle AD4J Console Setup

Assumptions

JVM Console Diagnostics

Console Login Screen

DB Connection Information

Repository DB Page

Console Setup Page

JVM Pool Info

Updating a JVM Pool

Update Pool Thresholds

Database Information

Register New Database/Update Screen

JVM Information Page

Monitoring

Manage Trace Files

Manage Users

Download Agent

A Frequently Asked Questions

Frequently Asked Questions

What is the Meaning of Cost?

In My Console, Why Do I See No Data Found in the Java Tab?

How Do I View a Specific Period in the NOC View?

Why are the User, Request, and IP Address fields Empty in the Thread View?

How Much Repository Space is Required for Monitoring and for Heap Dumps

How Do I Install the AD4J Database Agent on Windows?

Can I Still Use AD4J Without a Database Agent?

How Can I Check if my JVM is Supported by AD4J?

Where does the Agent Store Its Log Files?

How do I Prevent Agent from Terminating Program before Thread Execution is Completed?

List of Figures

1-1 AD4J Architecture

2-1 configure.sh Command Output

2-2 Console Repository Database Information

2-3 Maintain Repository Database

2-4 AD4J Console Diagnostics

2-5 Set Console Parameters

2-6 Installing Oracle AD4J Console Service 1

2-7 Installing Oracle AD4J Console Service 2

2-8 Install Output

2-9 AD4J Console Diagnostics

2-10 Downloading Agents

3-1 Web Application Modules

3-2 Uploading the WAR Archive

3-3 Choosing the jamagent.WAR file

3-4 Deploy a Web Application Module

3-5 Successful Deployment

3-6 Preparing for Application Installation

3-7 Install New Application - Step 2

3-8 Show Registered Databases

3-9 Add Database Information

3-10 Download AD4J Agent

4-1 AD4J Console DIagnostics

4-2 Console Login Screen

4-3 Login Screen Before Timeout

4-4 Console Repository Database Information

4-5 Maintain Repository Database

4-6 Change Console Parameters

4-7 Show JVM Pools

4-8 Edit JVM Pool Information

4-9 Edit JVM Pool Thresholds

4-10 Show Registered Databases

4-11 Register New Database

4-12 Show Registered JVMs

4-13 Edit JVM Information

4-14 Monitoring Status Page

4-15 Manage Trace Files

4-16 Manage Users

4-17 Download Agent

List of Tables

2-1 File install and configuration

2-2 Configuration

2-3 Certification Authority

2-4 Console Parameters

2-5 Prompted Questions

3-1 Oracle AD4J Agent Parameters

Oracle® Enterprise Manager

Oracle Application Diagnostics for Java (Oracle AD4J) Installation and Administration Guide

10g Release 5 (10.2.0.5)

E11085-03

August 2009

Oracle Enterprise Manager Oracle Application Diagnostics for Java (Oracle AD4J) Installation and Administration Guide, 10g Release 5 (10.2.0.5)

E11085-03

Copyright © 2009, Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

Oracle is a registered trademark of Oracle Corporation andsol;or its affiliates. Other names may be trademarks of their respective owners.

This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services..

Preface

This guide provides information about installing the console and the Oracle Application Diagnostics for Java (Oracle AD4J) Agent.

This preface contains the following topics:

Intended Audience

Documentation Accessibility

Intended Audience

This guide is meant for system administrators who use Oracle AD4J.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible to all users, including users that are disabled. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at

http://www.oracle.com/accessibility/

Accessibility of Code Examples in Documentation

Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

TTY Access to Oracle Support Services

To reach Oracle Support Services, use a telecommunications relay service (TRS) to call Oracle Support at 1.800.223.1711.

1 Introduction to Application Diagnostics for Java

This chapter provides an introduction to Oracle Enterprise Manager 10g Application Diagnostics for Java. It covers the following:

Overview

System Architecture

Software and Hardware Requirements

Overview

Mission critical Java applications often suffer from availability and performance problems. Developers and IT administrators spend a lot of time diagnosing the root cause of these problems. Many times, the problems occurring in production environments either cannot be reproduced or may take too long to reproduce in other environments. This can cause severe impact on the business.

Oracle Enterprise Manager 10g Application Diagnostics for Java (Oracle AD4J) is a lightweight Java application monitoring and diagnostics tool that enables administrators to diagnose performance problems in production. By eliminating the need to reproduce problems, it reduces the time required to resolve these problems. This improves application availability and performance. Using Oracle AD4J, administrators will be able identify the root cause of performance problems in the production environment without having to reproduce them in the test or development environment. It does not require complex instrumentation or restarting of the application to get in-depth application details. Application administrators will be able to identify Java problems or Database issues that are causing application downtime without any detailed application knowledge. The key features of Oracle AD4J are:

Low Overhead Monitoring with Deep Diagnostics

Easy Installation and Deployment

Real-Time JVM Visibility

Cross-Tier Transaction Tracing

Powerful Heap Analysis Tools

JVM Pooling

Real-time and Historical Diagnosis

JVM Tracing

Low Overhead Monitoring with Deep Diagnostics

Oracle AD4J provides in-depth monitoring of Java applications with very low overheads. Hence it does not slow down your application. It helps you to identify the slowest requests, slowest methods, requests waiting on I/O, requests using a lot of CPU cycles, and requests waiting on database calls. It also identifies the end-user requests that have been impacted by resource bottlenecks. Application resources that are causing the performance bottleneck are also visible.

Easy Installation and Deployment

Oracle AD4J is easy to install, deploy, and use. To install the product, you do not need to modify the source code / byte code of your application, or restart any application server. The AD4J Agent can be deployed easily without modifying the application or changing any configuration files. Once deployed, the Monitoring feature can be turned on so that it is always monitoring your production JVMs and databases. This saves time in reproducing the problems.

Real-Time JVM Visibility

Oracle AD4J provides immediate visibility into the Java stack. You can monitor thread states and Java method/line numbers in real time and you can proactively identify issues rather than diagnosing issues like application crashes, memory leaks, and application hangs after they occur.

If a particular request is hanging or if the entire application is slow, administrators can perform a real-time transaction trace to view current Java application activity. You can see the offending threads and their execution call stacks. You can also analyze various bottleneck resources such as how much time a thread spent in waiting for a database lock. Complex problems such as activity in one thread (or request) affecting the activity in the other thread or rest of the JVM can be found very quickly.

Cross-Tier Transaction Tracing

Oracle AD4J facilitates tracing of Java requests to the associated database sessions and vice-versa enabling rapid resolution of problems that span different tiers. It highlights the slowest SQL queries and helps administrators to tune SQL and the database to improve the performance application. This facilitates smooth communication between the database administrators and application administrators by isolating the problems to the database or the Java tier.

Powerful Heap Analysis Tools

Memory leaks lead to application slowdowns and eventually cause applications to crash. Oracle AD4J alerts administrators on abnormalities in Java memory consumption. Administrators can use Oracle's Java diagnostics console and take heap dumps in production applications without disturbing the application. They can take multiple heap dumps over a period of time, analyze the differences between the heap dumps and identify the object causing the memory leak. Heap analysis can be performed even across different application versions. Differential Heap Analysis with multiple heap dumps makes it easy to identify memory leaks.

JVM Pooling

Oracle AD4J allows administrators to group sets of JVMs together into JVM pools. This provides the console user with a single view across all related JVMs. Hence all JVM's that make up a single application or a single cluster may be grouped together in an application. This allows administrators to visualize problems naturally and intuitively.

Real-time and Historical Diagnosis

With Oracle AD4J, you can perform real-time and historical diagnostics on your Java applications. This provides you with detailed insight on the root causes of production problems without having to reproduce the same problem in a Test or QA environment. You can play back transactions interactively from the browser and view the time spent in the network and the server. You can also view the response time breakdown by Servlet, JSP, EJB, JDBC, and SQL layers.

Apart from the real-time data, you can also analyze historical data to diagnose problems that occurred in the past. You can view historical data that shows the time taken by end-user requests and the breakdown by Servlet, JSP, EJB, JDBC, and SQL layers.

JVM Tracing

Sometimes the monitoring interval (normally 1 second) that is in use is too coarse grained. The Java thread of interest may be too short lived or the amount of monitoring data collected may be insufficient. In such cases, you can run a JVM Trace to get fine-grained details of the JVM activity. This feature of AD4J allows you to monitor your Java application at a very high frequency (default of once every 50ms) for a short period of time. This allows you to identify interdependency of threads, bottleneck resources (DB, I/O, CPU, Locks, Network) & top methods.

System Architecture

The following figure shows the system architecture of Oracle's Java Diagnostics application.

Figure 1-1 AD4J Architecture

In this diagram, two AD4J Agents are being used to monitor a standard three tier Java based application. The JVM agent is used to monitor the mid-tier and the database agent is used to monitor the back end. The AD4J Console is a web-based console and does not require any client utility to be installed. In response to specific user actions on the console, the console makes various requests for monitoring data to the AD4J JVM Agent. The Agent takes snapshots of the state of the running JVM and sends a response back to the Console which is stored in the repository. If additional database correlation information is required, the Console sends a request to the AD4J DB Agent which in turn sends a response back to the Console. All the computation and post processing activity takes place only in the Console and its repository thereby ensuring optimal performance from the application itself.

Software and Hardware Requirements

Console JVM Requirements: Any 32-bit JDK.

AD4J Console: Windows (2000 or later), Windows XE, Linux (RHEL 3 or later), Solaris SPARC (8 or later), 1 CPU, 2GHz (Intel equivalent), 2GB RAM, 10GB Hard Disk.

Supported Console Repository Versions: Oracle 9i, 10g, and 11g either local or remotely installed. On Windows only, you can use the PostgreSQL starter database that is shipped with the product. This database must be changed to an Oracle database before production deployment.

To run the AD4J Console with a repository on Oracle XE, you need to increase the Max DB Sessions by entering the following commands in SQL*Plus:

SQL> show parameters sessions
SQL> alter system set sessions=500 scope=spfile;
SQL> show parameters processes
SQL> alter system set processes=500 scope=spfile;

Note:

When you load heap dumps, ensure that there is at least 5 times the amount of space as the file being loaded. E.g.: If you are loading a 1GB heap dump, you must ensure that there is 5GB available in the database.

2 Installing the Oracle AD4J Console

This chapter provides procedures for installing the Oracle AD4J Console. It covers the following:

Installing the AD4J Console on Unix

Installing the AD4J Console on Windows

Post-Installation Tasks

Installing the AD4J Console on Unix

This section covers the procedure to install the AD4J Console on the supported Unix platforms (i.e. Linux and Solaris). It describes the following:

Prerequisites

Installation Procedure

Uninstalling the AD4J Console on Unix

Prerequisites

Before you begin the installation process, do the following:

Determine the host system on which you want to deploy the console. Oracle recommends the use of a dedicated host for the console.

Install JDK 1.4.2 or later on that host. It must be a 32 bit JVM.

Note: You can a 32 bit JVM on a 64 bit operating system.

Have access to Oracle 9i (or later) database for use as a repository. This database may be local or remote.

Create a database user for the Oracle AD4J repository. Assign appropriate default and temporary tablespace and permissions to the user so that database objects can be created in these tablespaces.

Assign an appropriate table space for user (temp and default).

Have adequate space for the heap analysis features. You need about 5 times the heap size space for every heap snapshot.

Install the Oracle client on the console machine. This is required only for heap analysis features.

Depending on the platform, download jamserv-lnx.zip or jamserv-sun.zip.

Determine the http port you will use to access the console (the default is 3500).

Determine the TCP/IP port that agents will use to establish a connection with the console (the default is 3600).

Collect the requisite information for the DB Repository. See Collecting Database Repository Details for details.

Decide the location at which the console is to be installed. After installation, you must use the following URL to access the console: http://consolehost:<port_no>.You must download the agent to be deployed on the monitored JVMs. To log in, you must use the default console setup credentials , admin as the user name and welcome as the password. After you log in, you must change the default password. You can perform operations on the console only the password has been changed.

Installation Procedure

The installation procedure includes the following steps:

Collecting Database Repository Details

Extracting Files

Running the Configuration Script

Understanding Console Parameters

Starting Up and Initializing the Console

Specifying the Database Connection Details

Creating the Database Tables

Viewing JVM Console Diagnostics

Running the jamserv-win.msi File

Selecting the Installation Location

Setting the Console Parameters

Specifying the Port Information

Collecting Database Repository Details

You will need to collect the following information about the database:

DB server name (E.g. localhost)

Database name (E.g. orcl)

DB Listener Port (E.g. 1521)

Repository User Name

Repository User Password

Extracting Files

Unzip the archive file you have downloaded. Run the following command to extract the files at any location where the AD4J console is to be installed:

unzip jamserv-<platform>.zip

where <platform> can be lnx or sun. This creates a jamserv directory with the following sub-directories:

Table 2-1 File install and configuration

Console application files

jam

Configuration files

conf

Binaries and Shell scripts

bin

Sun binaries

bin/sun

Linux binaries

bin/lnx

Log files

logs

Library files

lib

Cache for JSP pages

cache

Trace files

trace

Running the Configuration Script

Now, run the following command to execute the configuration script from the jamserv directory:

./configure.sh <JDK_Home> [Agent_Port] [HTTP_Port]

The following table describes the parameters used in the command mentioned above.

Table 2-2 Configuration

Parameter
Default Value
Description

JDK_Home

None

The directory where Java is installed

HTTP_Port

3500

The HTTP port to access Oracle AD4J

Agent_Port

3600

The port that Oracle AD4J agents (this is not an HTTP port) use to communicate with the console.

Note:

Only the first parameter JDK_Home is mandatory. The rest are optional. So, if you choose 3500 as the default HTTP port and 3600 as the console port, and your JDK_Home is in /opt/jdk142, then run the following command:

./configure.sh /opt/jdk142

The configure.sh file creates self-signed certificates to enable secure access (HTTPS) to the console on port 3443. When the certificates and the certification authority (CA) are created, it prompts you with the following questions twice, once when creating the certification authority (CA) and again when creating the certificates.

Table 2-3 Certification Authority

Country Name

(2 letter code) [XY]:

State or Province Name

(full name) [CA]:

Locality Name

(For example, city) [Unknown]:

Organization Name

(For example, company) [Unknown]:

Organizational Unit Name

(For example, section) [Certificate Authority]:

Common Name

(For example, CA name) [mymachine01]:

Email Address

(For example, name@FQDN) [myname@aupt01]:

The following illustrates the configure.sh command output. Note that configure.sh prompts you for these questions twice.

Figure 2-1 configure.sh Command Output

It is important that when creating the certificate (second set of prompts), the Common Name and prompt #5 reflect the server name you will use in the URL to access. While the install script tries to determine the host name, you must ensure that the domain is correct.

For example, for HTTPS port, if the server name is console01, then you must specify https://console01:XXXX.

For HTTPS port, you cannot specify https://console01.mydomain.com:XXXX or http://124.25.113.10:XXXX where XXXX is the HTTPS port for the Apache listener.

However, for HTTP port, you can specify all the above names.The HTTPS port (default 3443) can, however, be changed by changing the following files:

jamserv/conf/httpd.conf

jamserv/conf/ssl.conf

It is strongly recommended that you replace this out-of-box certificate with a certificate issued by a well-known certificate authority.

Note:

To disable HTTP access and ensure secure access to the console, remove the Listen 80 command in the jamserv/conf/httpd.conf file.

Understanding Console Parameters

Before you initialize the console, you must understand the console parameters specified in the jamserv/conf/zone.properties file. The console parameters are described in the following table:

Table 2-4 Console Parameters

Parameter
Default
Description

jamport

None

Port where console listens for connections from agents.

jamloglevel

3

How much information should console log. High value provides greater debug information but can adversely affect the performance.

jamtimeout

20

Max seconds to wait for JVM to respond.

jamlooptimeout

15

Max seconds to wait for JVM to respond for multiple JVM requests.

jampropfilepath

None

When the console starts up for the first time, it creates a property file adminDB.properties where it stores information about the repository DB. This parameter specifies the directory where the file should be created. This file contains sensitive information including username, password. It should be a secure location.

jamtracefilepath

None

Directory where to put the trace files.

Starting Up and Initializing the Console

Run the following command to start the console:

jamserv/bin/apachectl start

Note:

If you see a 500 HTTP Error in your web browser after you run this command, it indicates that the Jserv process was not automatically started. To start it manually, enter the following command:

jamserv/bin/jservctl

To view details about the error messages, access the jamserv/logs/error.log file. The file provides details about the following:

Class path used by the Oracle AD4J Console

Parameters (default and non-default) in use

Build version of the console

Console is ready for connections from agents

Specifying the Database Connection Details

The adminDB.properties file stores connection details about the repository database. The file resides in the location specified by the start up parameter - jampropfilepath.

To modify the file, do the following:

Click Setup.

The console displays the JAM Console Diagnostics page.

Click the adminDB.properties link.

The console displays the Console Repository Database Information page (Figure 2-2).

Figure 2-2 Console Repository Database Information

Modify the settings.

Restart the console to see the changed settings in effect.

Creating the Database Tables

After you specify the database connection details, create the database objects in the repository by following these steps:

Click Setup.

Click Repository DB.

The console displays the Maintain Repository Database page (Figure 2-3).

Figure 2-3 Maintain Repository Database

To create the repository objects, click Go.

To run the diagnostics, click Setup.

The console is now configured and ready to accept any incoming JVM Connections.

Viewing JVM Console Diagnostics

Whenever you click Setup, the console runs the diagnostics. Here, you can view details about the configuration of the console and also the errors (if any).

For example, if a database connection cannot be established for some reason, it would show up here along with some debug information.

To view JVM console diagnostics, click Setup.

The console displays the following page.

Figure 2-4 AD4J Console Diagnostics

Uninstalling the AD4J Console on Unix

To deinstall the Oracle AD4J console from UNIX platforms, go to the location where you extracted the contents of the jamserv.zip file, and delete the jamserv directory completely.

Installing the AD4J Console on Windows

This section provides installation procedures for installing the Oracle AD4J console on Microsoft Windows platforms, such as Microsoft Windows Itanium, and Microsoft Windows x86_64. It covers the following:

Prerequisites

Installation Procedure

Uninstalling the AD4J Console on Windows

Prerequisites

Before you start the installation process, do the following:

You must be running Microsoft Windows 2000, XP, or 2003.

You must download jamserv-win.msi. This is the Microsoft Windows Installer package along with the web listener, client database drivers and utilities, JDK HOME, and postgreSQL database.

You must decide on the location where you want to install the console.

After installation, you must use the following URL to access the console:

http://consolehost:<port_no>

You must download the agent to be deployed on the monitored JVMs.

To log in, you must use the default console setup credentials , admin as the user name and welcome as the password. After you log in, you must change the default password. You can perform operations on the console only the password has been changed.

Installation Procedure

The installation procedure includes the following steps:

Running the jamserv-win.msi File

Selecting the Installation Location

Setting the Console Parameters

Specifying the Port Information

Running the jamserv-win.msi File

As a first step, run the jamserv-win.msi file to invoke the installation wizard. The Welcome screen is displayed. Click Next to continue with the installation.

Note:

Run the upgrade-win.zip if you are upgrading an existing installation.

Selecting the Installation Location

On the Select Installation Folder screen, select a directory where you can install the console. The installer creates a subdirectory called jamserv. To continue, click Next.

Setting the Console Parameters

In the Database Dir field in the Configure JAM Console Parameters screen, select an alternate drive or different location with sufficient space where the database files can be placed. You can specify the path manually or click Browse to select the folder.

If you are using the local built-in database, we recommend that you to select an alternate drive because the database can grow to several gigabytes.

Inside this directory, the installer automatically creates a sub-directory titled pgdata.

Figure 2-5 Set Console Parameters

Specifying the Port Information

After selecting the database directory, you can accept the default values for other parameters. The http port is the port you use in the URL to access the console. The Oracle AD4J Port is what you will provide the Oracle AD4J Agents along with the hostname so that the agents can connect to the console. The Jserv port is used internally by the Console and need not be changed.

You will see the screen scroll as all the files are extracted and the Oracle AD4J Console service installed and started.

Figure 2-6 Installing Oracle AD4J Console Service 1

Figure 2-7 Installing Oracle AD4J Console Service 2

The Installer creates self-signed certificates to enable secure http (https) access on port 443 to the console. When the certificates and the certification authority (CA) are created, you are prompted with the following questions twice. Once when creating the certification authority (CA) and again when creating the certificates.

Table 2-5 Prompted Questions

Country Name

(2 letter code) [XY]:

State or Province Name

(full name) [CA]:

Locality Name

(e.g., city) [Unknown]:

Organization Name

(e.g., company) [Unknown]:

Organizational Unit Name

(e.g., section) [Certificate Authority]:

Common Name

(e.g., CA name) [mymachine01]:

Email Address

(e.g., name@FQDN) [myname@mycompany.com]:

The following is the install output. Note that install prompts you for these questions twice.

Figure 2-8 Install Output

It is important that when creating the certificate (second set of prompts), the Common Name and prompt #5 reflect the server name you use in the URL to access. While the install script tries to determine the host name, you must ensure that the domain is accurate.

For example: If the server name is console01, you can only specify https://console01:XXXX.

You cannot specify https://console01.mydomain.com:XXXX or http://123.123.123.123:XXXX where XXXX is the https port for the Apache listener. You can, however, specify all the above names on the http port

The HTTPS port (default 443) can be changed by changing the following files:

jamserv/conf/httpd.conf

jamserv/conf/ssl.conf

It is strongly recommended that you replace this out-of-box certificate with a certificates issued by a well-known certificate authority.

The installation is now complete and shortcuts to stop and start the console service, load the heaps, and uninstall the product are also available.

Uninstalling the AD4J Console on Windows

To uninstall the AD4J Console on Windows, from the Start menu, click Programs, and JAM Console. Then click Uninstall JADE to uninstall the console.

Post-Installation Tasks

This section covers the following:

Accessing the AD4J Console for the First Time

Setting Up the Console and Diagnostics

Deploying the Agent on Monitored JVMs and Databases

Accessing the AD4J Console for the First Time

If you want to access the console from the host where you installed it, then use the following URL:

http://localhost:3500 or http://localhost:80 (on Windows)

If you want to access the console from a different host, then use the following URL:

http://hostname:3500 or http://hostname:80 (on Windows)

Here, hostname is the host on which you installed the console.

When you access the Oracle AD4J console for the first time, it does the following:

Runs diagnostics

Prompts you for the database connection details for the repository and stores it in the admin.DBProperties file

Creates the necessary DB objects in the repository

Setting Up the Console and Diagnostics

The console must be accessible from the URL http://localhost if accessing from the machine where it was installed. From another machine, it must be accessible from http://hostname where the host name is the machine on which your console is installed. The default password for the admin user is welcome.

When you access the Oracle AD4J console for the first time, it will run Diagnostics.Whenever you click on the Setup tab, it will run Diagnostics. Here, you can see information about the configuration of the console and the errors (if any). For example, if a database connection cannot be established for some reason, it would show up here along with some debug information.

Figure 2-9 AD4J Console Diagnostics

Deploying the Agent on Monitored JVMs and Databases

The agents can be downloaded from the Download Agent screen. To display this screen, select the Setup tab from the console and click Download Agent.

Figure 2-10 Downloading Agents

If you are running the console on a machine with DHCP, and the agent is running on the same machine, you can use the WAR file for deployment on local machine. Otherwise, use the WAR file for deployment on remote machine.

3 Installing the AD4J Agent

This chapter describes the procedure to install the AD4J Agent. It covers the following:

Before you Start

Installing the AD4J Agent on Oracle Application Server 10g

Installing the AD4J Agent on Oracle WebLogic

Installing the AD4J Agent on Apache Tomcat

Installing the Oracle AD4J Agent on Apache JServ

Installing the Oracle AD4J Agent on IBM WebSphere

Installing the Oracle AD4J Agent on Standalone Java Applications

Installing the Database Agent

Before you Start

To install the AD4J Agent, you must do the following:

Login to your Application Server console.

Download the Java agent from the Oracle AD4J Console and deploy it to the JVM using the standard deployment techniques for your Application Server.

If necessary, customize the AD4J Agent and specify the parameters as described in Customizing the Oracle AD4J Agent.

Download the DB Agent from the Oracle AD4J Console and deploy it to your database.

Customizing the Oracle AD4J Agent

The AD4J Agent WAR file contains an embedded web.xml deployment descriptor. This file contains the default values of the Oracle AD4J Agent input parameters. You can change the parameters if you want. To do so, extract the web.xml file from the WAR archive and then update it.

To explode or update the WAR file, do the following:

To extract the web.xml file from the WAR archive, run the following command:

jar xvf jamagent.war WEB-INF/web.xml

Edit the web.xml file with your custom values for input parameters in any text editor. You may only change the values within the <param-name> fields of this file. No other changes are supported.

Then run the following command to place the new web.xml file back into the archive:

jar uvf jamagent.war WEB-INF/web.xml

To remove the newly created directory, run the following command:

rm -rf WEB-INF

The following are the Oracle AD4J Agent parameters.

Table 3-1 Oracle AD4J Agent Parameters

Parameter
Default
Description

jamconshost

localhost

The server where console is running.

jamconsport

3600

The port where the console is listening for the agents.

jamjvmid

Application Server Port or 5555

Identifies the specific JVM on the console when you have multiple JVMs on the same machine. For most app servers, this identifier is the port which the server is listening on (Web Server Port for Weblogic, Jserv port for Apache). If the application server port cannot be discovered then this value is used.

jamconsretr

90

If the console goes down, the agent will keep trying to reconnect. This parameter specifies the duration in seconds between each attempt. The default value is 90 seconds (15 minutes) between each try. If this parameter is set to 0, then the agent will not try to reconnect.

jamtimeout

300

Maximum time duration for a request. If a request takes longer time than this timeout, it is terminated.

jamloglevel

3

Level of logging. Valid values range from 1 to 5.

jammaxbackoff

10

Some times we wait for other operations to finish (like GC or main thread initialization). The amount of sleep time between the retries increases exponentially till this number. When this number is reached, we give up and return with failure.

jamdelaystartup

0

This parameter is only for standalone programs. If you want to analyze the startup behavior of a monitored program, you can use this parameter. This specifies the number of seconds to wait before starting the target program.

jamisdaemon

false

This parameter is only for standalone programs. When using jamrun with standalone programs, the agent will normally exit when the main method in the target program completes. In some programs the threads might still be active after main completes.In such cases specify jamisdaemon=true to prevent the agent from exiting.

Web.XML Contents

<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN""http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>jamagent</servlet-name>
<servlet-class>jamagent.jaminit</servlet-class>
<init-param>
<param-name>jamconshost</param-name>
<param-value>localhost</param-value>
<description>Default Jam Console host</description>
</init-param>
<init-param>
<param-name>jamconsport</param-name>
<param-value>3600</param-value>
<description>Jam console port</description>
</init-param>
<init-param>
<param-name>jamconsretr</param-name>
<param-value>90</param-value>
<description>Jam console number of retries</description>
</init-param>
<init-param>
<param-name>jamtimeout</param-name>
<param-value>900</param-value>
<description>Jam console timeout</description>
</init-param>
<init-param>
<param-name>jamloglevel</param-name>
<param-value>3</param-value>
<description>Jam log level</description>
</init-param>
<init-param>
<param-name>jammaxbackoff</param-name>
<param-value>10</param-value>
<description>Max time to wait for long operations</description>
</init-param>
<init-param>
<param-name>jamjvmid</param-name>
<param-value>Aplication Server Port</param-value>
<description> Unique Identifier for JVM. It will detect and use the WLS port bydefault.</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>

Installing the AD4J Agent on Oracle Application Server 10g

This section describes the procedure to install the AD4J Agent on Oracle Application Server 10g. To install the Agent, you must do the following:

Login to the Enterprise Manager 10g console to administer Application Server 10g. Enterprise Manager 10g is installed by default when you install iAS 10g. Make sure you can log on to Enterprise Manager as the administrative user, ias_admin.

Deploy the jamgent.war file from the Oracle AD4J Console as described in Deploying the Agent WAR.

Customize the Oracle AD4J Agent and specify the parameters. The jamgent.war file contains the java classes and native libraries that constitute the Oracle AD4J Agent. It also contains the default Oracle AD4J Agent input parameters in the packaged web.xml file. See Customizing the Oracle AD4J Agent for details.

Deploying the Agent WAR

The following steps assume that the Oracle AD4J Console is running on the host where the .war file is deployed. The steps also assume that Oracle AD4J Console is using the default port, that is, port 3600. If not, then change the default settings. For information about the default settings and the procedure to change them, refer to Customizing the Oracle AD4J Agent.

To deploy the agent WAR file:

Log on to Enterprise Manager iAS 10g as ias_admin.

Enterprise Manager displays the Home page by default.

On the Home page, in the System Components section, you will find an OC4J instance called home. This OC4J instance is available by default. Click the home instance name to open the administration page of this OC4J instance.

Click the Applications tab.

Enterprise Manager displays the page for managing applications deployed in the home OC4J instance.

Click Deploy WAR file and provide the following details:

Web Application - Specify the path (along with the file name) for the jamgent.war file. You can click Browse to locate the file on your computer.

Application Name - Specify jamagent.

Map to URL - Specify /jamagent.

Click Deploy to deploy the jamagent.war file.

To test the deployment, log on to the Oracle AD4J Console and view the JVM running the OC4J instance on the main page.

Installing the AD4J Agent on Oracle WebLogic

This section describes the procedure to install the AD4J Agent on Oracle WebLogic. Before you install the AD4J Agent, you must have installed and configured the Oracle AD4J Console. You must also ensure that the Weblogic Administration Console is up and running. To install the AD4J Agent, you must do the following:

Login to the Oracle WebLogic Admin Console.

Deploy the jamgent.war containing the agent classes and the native libraries as described in Deploying the Agent WAR.

Customize the Oracle AD4J Agent and specify the parameters as described in Customizing the Oracle AD4J Agent. The jamagent.war also contains the default Oracle AD4J Agent input parameters in the packaged web.xml file.

Deploying the Agent WAR

To deploy the Agent WAR file, do the following:

Log on to the Administration Console using the following URL:

http://weblogichost:ADMINPORT/console

From the tree view, select Deployments and then Web Application Modules.

The Web Applications page displays the web applications currently deployed on the Weblogic Application Server.

Figure 3-1 Web Application Modules

On the Web Applications page, click Deploy a New Web Application Module.

The Deploy a Web Application Module page displays.

Figure 3-2 Uploading the WAR Archive

On the Deploy a Web Application Module page, do the following:

Upload the WAR archive directly from the local file system.Choose the WAR archive placed on the server.Use the exploded WAR on the server

Explore all three approaches.

Select the jamagent.WAR file.

Figure 3-3 Choosing the jamagent.WAR file

Go to the next screen and click Deploy.

Figure 3-4 Deploy a Web Application Module

A successful deployment takes you to the following screen:

Figure 3-5 Successful Deployment

Installing the AD4J Agent on Apache Tomcat

This section describes the procedure to install the AD4J Agent on Apache Tomcat. Before you install the agent, you must ensure that Tomcat has been correctly installed. You can test this by starting Tomcat and bringing up the default page - http://<host>:8080. If you have not installed on the default port, replace 8080 with your port number. To install the agent, you must do the following:

Copy jamagent.war to $CATALINA_HOME/webapps directory.

Deploy the jamagent.war file containing the java classes and native libraries that constitute the Oracle AD4J Agent. See Deploying the Agent WAR for details.

Customize the Oracle AD4J Agent and specify the parameters as described in Customizing the Oracle AD4J Agent. The jamagent.war also contains the default Oracle AD4J Agent input parameters in the packaged web.xml file.

Restart Tomcat.

Deploying the Agent WAR

These steps assume that the Oracle AD4J Console is running on the same host where the war file is being deployed. It also assumes that Oracle AD4J Console is using the default port - 3600. If not, refer to Customizing the Oracle AD4J Agent to change these default settings.

Copy the jamagent.war to the $CATALINA_HOME/webapps directory.

Shutdown Tomcat using $CATALINA_HOME/bin/shutdown.sh

Startup Tomcat using $CATALINA_HOME/bin/startup.sh

Tomcat automatically explodes the war and deploys it.

To test, log on to the Oracle AD4J Console. The jvm running Tomcat now appears on the main page.

Installing the Oracle AD4J Agent on Apache JServ

This section describes the procedure to install the Oracle AD4J Agent on Apache JServ. To install the agent, you must do the following:

Include the file jamagent.zip in the CLASS_PATH. This is described in:

Setting Up the CLASSPATH - Automatic Mode

Setting Up the CLASSPATH - Manual Mode

Edit the Jserv configuration files to load the servlet jamagent.jaminit as describe in Loading the Servlet at Startup Time.

Note:

You need a copy of jamagent.zip for your platform and a working console for the agent to connect to. (The console must be up and listening for JVM connections on localhost port 3600).

Customize the Oracle AD4J Agent and specify the parameters as described in Customizing the Oracle AD4J Agent.

Setting Up the CLASSPATH - Automatic Mode

If you are running Apache in automatic mode (jserv.conf: ApJServManual is off), apache automatically starts the JVMs. The CLASSPATH is specified in jserv.properties by the parameter wrapper.classpath. If your jamagent.zip lives in /u01/app/jam/jamagent, then you'll add the following line to jserv.properties wrapper.classpath=/u01/app/jam/jamagent/jamagent.zip.

Setting Up the CLASSPATH - Manual Mode

When ApJServManual is on, you must use a separate script (typically called jservctl) to start the JVM. You have to add jamagent.zip to the CLASS_PATH in this file. You can do this in either of these methods:

CLASSPATH is defined as an environment variable

CLASSPATH is passed with -classpath to the java command

If your jamagent.zip is located in the /u01/app/jam/jamagent directory, you must add /u01/app/jam/jamgent/jamagent.zip to the CLASSPATH.

Loading the Servlet at Startup Time

To load the servlet at startup time, add the following lines to the zone.properties file for Apache Jserv:

servlets.startup=jamagent.jaminitservlet.jamagent.jaminit.initArgs=jamconshost=localhostservlet.jamagent.jaminit.initArgs=jamconsport=3600

The first line instructs the servlet container to start the servlet jamagent.jaminit. The other one passes the startup parameters jamconshost=localhost and jamconsport=3600 to specify the location of the console.

Installing the Oracle AD4J Agent on IBM WebSphere

This section describes the procedure to install the Oracle AD4J Agent on IBM WebSphere. Before you install the agent, the WebSphere Administrative Console should be up and running. You must also have installed and configured Oracle AD4J Console. For WebSphere installation, you require a jamagent.war file that contains the java classes and native libraries that constitute the Oracle AD4J Agent. To install the agent, you must do the following:

Log on to the IBM WebSphere Application Server Express Administrative Console.

Deploy jamagent.war containing the agent classes and native libraries as described in Deploying the Agent WAR.

Customize the Oracle AD4J Agent and specify the parameters as described in Customizing the Oracle AD4J Agent. The jamagent.war also contains the default Oracle AD4J Agent input parameters in the packaged web.xml file.

Deploying the Agent WAR

To deploy the Agent WAR file, do the following:

Log on to the Administrative Console using the following URL:

http://hostname:7090/admin

From the tree view, select Applications and then Install New Application.

The Preparing for Application Installation page opens where you can select the module to upload.

Figure 3-6 Preparing for Application Installation

Click Browse to choose the downloaded jamagent.war file from your desktop.

Provide a context root of jamagent in the Context Root text box.

Select the Generate Default Bindings and click Next.

Review warning if any and click Continue.

Select the Enable Class Reloading check box from the AppDeployment Options section and click Next. (figure)

Select jamagent.war from the Step:2 Map virtual hosts for Web Module section of the Install New Application page and click Next.

Figure 3-7 Install New Application - Step 2

Select jamagent.war for Step 3: Map modules to application Servers as well and click Finish.

Click Save to Master Configuration and then click Save.

Click the Enterprise Application from the tree view on the left side.

Select jamagent.war and click Start.

AD4J agent is deployed and started.

Installing the Oracle AD4J Agent on Standalone Java Applications

This section describes the procedure to install the Oracle AD4J Agent on Standalone Java Applications. Before you install the agent, you must have installed and configured the Oracle AD4J Console. To install the agent, you must do the following:

Include the jamagent.zip in the CLASSPATH. See Adding the Oracle AD4J Agent and Libraries, Classes to Classpath.

Change the java call to call the jamagent.jamrun wrapper class. The wrapper class is required to monitor and diagnose Java programs that do not have a way of loading a servlet or another class. The following sections describe the original and modified java call:

Original Java Call

Modified Java Call with Oracle AD4J Agent

Customize the Oracle AD4J Agent and specify the parameters as described in Customizing the Oracle AD4J Agent.

Original Java Call

java $JVM_OPTIONS $TARGET_CLASS $TARGET_CLASS_PARAMS

Here, JVM_OPTIONS are the JVM properties and options.

For example:

-Xmx512M -Dweblogic.name

TARGET_CLASS is the program which being examined

TARGET_CLASS_PARAMS are parameters passed to the class

The idea is to run the target program through jamagent.jamrun. This is done by calling the jamagent.jamrun.

Modified Java Call with Oracle AD4J Agent

java $JVM_OPTIONS jamagent.jamrun [$JAMAGENT_PARAMS_LIST] $TARGET_CLASS $TARGET_CLASS_PARAMS

Oracle AD4J uses default parameters. If you want to change any parameter, you can specify them as name=value pairs. To specify a different console and port, enter the following command:

jamconshost=<console hostname>, jamconsport=<console port>

Thus, to run the Oracle AD4J Agent, you just need to edit the script which starts your program.

It is not required to do anything with the target program parameters. They are picked up and passed along to the program by jamrun.

Sample Configuration

In this example, the MainClass is being called and the steps to edit the Java Call are shown below:

"$JAVA_HOME/bin/java" ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} com.example.MainClass

The class being called is com.example.MainClass. There are no parameters. Insert the class and parameters before the class as follows:

"$JAVA_HOME/bin/java" ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} jamagent.jamrun com.example.MainClass

If you want to change some Oracle AD4J parameters, you can specify them as:

"$JAVA_HOME/bin/java" ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} jamagent.jamrun jamconshost=myconsole01 jamisdaemon=true jamjvmid=3001 com.example.MainClass

Refer to the Frequently Asked Questions appendix for more details on setting the jamisdemon parameter.

Adding the Oracle AD4J Agent and Libraries, Classes to Classpath

We also need to add the jamagent.zip directory to the CLASSPATH.

It is best to do this just before the call to java.

Here we find a couple of lines above the call to Java.

CLASSPATH="example1.jar:example2.jar

We can add the jamagent.zip file to the CLASSPATH by adding the following line before the original Java call.

CLASSPATH=${CLASSPATH} : /opt/jamagent/jamagent.zip

Target Parameters

About the -Dweblogic and other properties, you must insert jamagent.jamrun just before the calling program and its parameters. This should happen after all the JVM options and properties have been specified.

Installing the Database Agent

To track database bottlenecks to Java and Java bottlenecks into the database, you need to run a DB Agent on the DB Server and register the database with the console. This section outlines the steps to accomplish this and contains the following steps:

Prerequisites

Register the Database in the Setup Tab

Download the DB Agent for Your Platform from the Console

Download the Agent for Your Database Platform

Prerequisites

Oracle AD4J Console needs to be installed, configured and accessible.You need to have the admin password on Oracle AD4J Console to register a new databaseYou will then need the DB username and password on the target database with select privileges on GV_$SESSION, GV_$SESSION_WAIT, GV_$PROCESS, GV_$SQLTEXT, GV_$SQLAREA, GV_$LOCK, and GV_$LATCHNAME fixed views.You will also need to be able to run a program on the database server as the OS user who owns the database (in most cases this is the user name oracle)

Note:

In this release, databases running on Windows cannot be monitored.

Register the Database in the Setup Tab

Follow these steps to register the database:

Click the Setup tab.

The Setup options are displayed. Click Databases. The Show Registered Databases screen is displayed.

Figure 3-8 Show Registered Databases

Click Register New DB. The Add Database Information screen is displayed.

Figure 3-9 Add Database Information

Enter the database information and click Save to register the new database.

Note:

Before you can monitor a RAC database, you need to register all the nodes in the database and run the Agent on each node.

Download the DB Agent for Your Platform from the Console

Follow these steps to download the DB Agent for your platform:

Click the Setup tab.

The Setup options are displayed. Click Download Agent. The Download AD4J Agent is displayed.

Figure 3-10 Download AD4J Agent

Click on the Download icon to download the agent for your database platform.

Download the Agent for Your Database Platform

Depending on your method of upload to the database server, you might need to change the permissions of the agent.

chmod +x dbagent

Note:

On some operating systems (such as AIX), due to system level restrictions, you must run the dbagent as the root user.

The dbagent needs two parameters to be passed to it, which are:

the host where the console is running.

the port which is being used to accept connections from the agents (default value 3600).

To pass these parameters, enter the following command:

nohup dbagent jamconshost=console01 jamconsport=3600 > dbagent.log 2>&1 &

You should see the following message in the console error log.

JAM Console: Agent connection from 192.168.1.31:59269, [Hostname] jamdb.us.oracle.com

JAM Console: Received AJDBOracle|Oracle-Sun9i|oracle|SunOS 5.8|oracle|3|0|0 Oracle AD4J Console: New DB 0

The number next to New DB changes everytime a new DB agent is pointed to the AD4J Console.

Note:

If you want to stop the database agent, then manually kill the process. For UNIX platforms, run the ps command to view the database agent process and kill it using the kill command.

4 Setting Up and Using the AD4J Console

This chapter provides information about the administration tasks that you can perform with Oracle Application Diagnostics For Java (Oracle AD4J). In particular, the chapter covers the following:

Oracle AD4J Console Setup

Assumptions

JVM Console Diagnostics

Console Login Screen

DB Connection Information

Repository DB Page

Console Setup Page

JVM Pool Info

Updating a JVM Pool

Update Pool Thresholds

Database Information

Register New Database/Update Screen

JVM Information Page

Monitoring

Manage Trace Files

Manage Users

Download Agent

Note:

By default, Oracle AD4J Agent will write the following files to /tmp (C:\ on Windows):

Heapdump file

Change for specific JVM from the Setup -> JVMs -> Edit JVM -> Heapdump Dir.

Extract and load native libraries

Change the parameter jamlibdir in the file jamserv/jam/jamagent/WEB-INF and rebuild wars.

Log file (only on Windows)

This is always written to C:\

Oracle AD4J Console Setup

If you have followed the default installation, the console should be accessible from the URL

http://console01.mycompany.com:3500

Where console01.mycompany.com is the name of the server you have installed the console on. You can also access the console using the IP address zzz.zzz.zzz.zzz for the server.

http://zzz.zzz.zzz.zzz:3500

Note:

The default port for Linux is 3500 and for Windows, it is 80. If you are using HTTPS, the default port number will be different.

Assumptions

This guide assumes the following:

Console is installed and running

Console has been configured correctly with a repository database

Database agents are installed and running

Java agents are installed and running

For details on how to set up the console and agents, refer to the Oracle AD4J Installation Notes.

JVM Console Diagnostics

When you first access the console, it will take you to the Setup tab and run Diagnostics. Here, you can see the information about the configuration of the console and the errors (if any). For example, if a connection to the console repository cannot be established for any reason, it would show up here along with some debug information.

Figure 4-1 AD4J Console DIagnostics

Console Login Screen

You are taken to the Login screen if you want to modify any admin information on the Oracle AD4J console. Login as the administrator to continue. The default administrator username and password is admin and welcome. You will need to change the password after your first login.

Figure 4-2 Console Login Screen

You get the following screen if you try logging in again before timeout.

Figure 4-3 Login Screen Before Timeout

DB Connection Information

The adminDB.properties file stores connection information about the repository database. The file resides in the location specified by the start up parameter jampropfilepath.

Click on the adminDB.properties link to create the file:

Figure 4-4 Console Repository Database Information

Enter the fields with a valid DB Connection Information. Refer to the Oracle AD4J Console Install Note for details.

Repository DB Page

From this page you can create and/or view the tables and indexes in the database that are being used by the Oracle AD4J console.

Figure 4-5 Maintain Repository Database

Console Setup Page

This page is used to set console parameters and reset lost passwords.

Figure 4-6 Change Console Parameters

Console Log Level, Cross Tier Log Level: Verbosity of console log messages. Increase only when advised by Oracle Support.

Agent Request Timeout, Agent Loop Request Timeout: Increase if the monitored JVMs are extremely busy and the console times out and disconnects waiting for their response.

Require login for Java tab: Enable this checkbox to restrict access to other (non-setup Tabs). Users will need to login with valid accounts (created from the Users screen) and will have access to all non-setup screens. The setup screens can only be accessed by the ADMIN user.

Enable Monitoring: With this checkbox enabled, JVMs belonging to selected pools will be polled for active requests periodically. This data is available on the NOC and in the last 90 seconds/24 hrs charts.

Email Alerts: Email alerts based upon threshold violations (requires monitoring to be enabled).

Email Prefix for UserName, SMTP Mail Host, Send Mail As: Parameters used for emailing alerts.

SNMP Alerts: Send SNMP traps for threshold violations (requires monitoring to be enabled).

SNMP Host for Alerts: SNMP Host to send alerts to.

Reset Password Screen can be used to reset lost passwords and does not require old password.

JVM Pool Info

You can group sets of JVMs into JVM pools that provide monitoring information across all related JVMs in a single view. This table displays all the JVM pools in the system. You can view all available pools, delete existing pools or add new pools. The Default and Other pools cannot be deleted. Any user defined pools can be deleted.

Each row displays whether polling is currently enabled for the pool, the polling interval, and the email notification recipient. If the Polling Enabled flag is set to Y, JVMs belonging to this pool will be polled for active requests periodically based on the Poll Interval. You can click on the Edit icon to edit the JVM pool or click on New Pool to add a new JVM Pool.

Figure 4-7 Show JVM Pools

Updating a JVM Pool

To update a JVM Pool, click the Edit icon in the Show JVM Pools page. The Edit JVM Pool page is displayed:

Figure 4-8 Edit JVM Pool Information

Poll interval (ms): Sample interval for JVMs belonging to this pool when monitoring (polling) is enabled.

Poll Enabled: Enable monitoring for this pool.

Email Alerts to: Email Alias/list to email this pool's alerts to.

Update Pool Thresholds

Threshold violations can have a Level of R (Red) or Y (Yellow). The Metric is the attribute being monitored and the Threshold is the value against which that metric is being compared. A violation occurs when the threshold is exceeded after a minimum number of samples have been monitored. Threshold units are % CPU Utilization for Machine CPU (CPU), JVM CPU (CPU), % Heap Utilization for Heap, number of threads in that state for others. 3 to 5 threads active in DB for more than 50% of the samples will cause an amber (Y) alert for DB, while 6+ threads active in DB wait state for more than 50% of the samples will cause a red alert for DB.

Action URL is the URL to be invoked when a threshold violation occurs. This includes internal URLs into the AD4J console and external URLs. The Action URL can be any valid URL on a remote system. It can also accept URLs on the local AD4J Console. It can be used to trace a particular thread, all active threads, or dump a heap in response to a threshold violation.

The Action URL should be a valid URL as called from a browser. If not specified, default parameters for the traceThread and heapdump will be added to the URL. If the Action URL specifies a host that is different from the current console host, you must navigate to the Console Setup page and uncheck the Require Login for Java Tab checkbox.

A sample URL template for Tracing Threads is given below:

http://localhost/jvmTraceActive.jsp?traceThread=allactive&JVM_THREAD_ID=&JVM_ID=1&JVM_MACHINE=machine_name&JVM_PORT=8080&pollInterval=50&pollDuration=10&samplesfilename=traceactive&detailsfile=on

where:

traceThread is the name of the thread to be traced. If you want to trace all the active threads, specify the value as traceThread=allactive. This is the value in the Thread column in the View All Threads page.

JVM_THREAD_ID is the ID of the thread to be traced. If you want to trace all active threads or if traceThread=allactive, the JVM_THREAD_ID parameter must be blank. This is the value specified in the OS PID column in the View All Threads page.

JVM_ID, JVM_MACHINE, JVM_PORT are the ID, machine name, and port number of the JVM Agent on which the thread or threads to be trace are running. For example, if the text displayed at the top of the View All Threads page is - Name: machine_name:8080 ID: 1: Linux-2.6.9-55.0.0.0.2.EL: Sun Microsystems Inc.: 1.6.0_07

machine_name is the JVM_MACHINE

8080 is the JVM_PORT

1 is the JVM_ID (If the JVM_ID parameter is not supplied in the URL, it is automatically appended by the Console)

PollInterval is the time interval (in milliseconds) between successive samples. The default value is 50.

PollDuration is the duration (in seconds) for the trace. The default value is 10.

Samplesfilename is the prefix of the trace sample file name created on the console machine. The default value is traceactive and an unique identifier is added as a suffix to each trace file that is created.

Detailsfile is the sample thread stack in addition to the state. You must set this to On if you require complete thread details. The default is On.

A sample URL for heapdump is given below:

http://localhost/jvmHeapDump.jsp?JVM_ID=1&JVM_MACHINE=machine_name&JVM_PORT=8080&JVM_DUMP_FILE=heapdump <http://localhost/jvmHeapDump.jsp?JVM_ID=1&JVM_MACHINE=machine_name&JVM_PORT=8080&JVM_DUMP_FILE=heapdump>

The following parameters are required in the URL for heapdump.

JVM_ID, JVM_MACHINE, and JVM_PORT are the same parameters as specified for the Tracing Threads template.

JVM_DUMP_FILE is the prefix of the heap dump file name on the agent. An unique identifier is added as a suffix to each heap dump file.

Figure 4-9 Edit JVM Pool Thresholds

Database Information

Use this screen to view information about the databases being monitored/profiled currently or to add additional databases for the same.

Figure 4-10 Show Registered Databases

Click the Edit icon to edit an existing database or click Register NewDB to register a new database.

Register New Database/Update Screen

Enter the database information in the New

Figure 4-11 Register New Database

Registered DB Name: Provide a user friendly name for Oracle AD4J to display.

DB Hostname: Database server for this monitored instance.

Actual DB Name: Actual Oracle SID for the monitored DB.

DB Port: Oracle Net Listener Port on the DB Server.

DB User: DB User to use for querying database information.

Password: (only in update/new mode) : The password for the DB User.

DB User (Explain Plan): Application DB User account to use for explain plan analysis.

DB OS User: Operating System User which owns the database.

JVM Information Page

Figure 4-12 Show Registered JVMs

Lists all the JVMs that have connected to the console. You can edit the JVM parameters using the edit icon, or delete old JVMs that no longer connect to the console.

Figure 4-13 Edit JVM Information

You can assign a JVM to a different pool, change it's log level (if recommended by Support) or change the temporary directory where the heap snapshots are dumped.

Monitoring

Once you have updated a JVM pool with polling enabled, you can monitor the JVMs in that pool.

Figure 4-14 Monitoring Status Page

Click on the Start Monitoring link above to start monitoring. This can also be done from the Console Setup Screen. You can enable or disable monitoring of pools or change their polling intervals by updating the pool properties.

You can mark a thread as idle by adding it to an Idle Thread Rule. All threads that have been marked as idle will not be monitored. Click New Rule to create a new Idle Thread Rule. The Rule Type can be:

Monitor (Waiting on Lock): Select this type if you want to ignore all threads that are locked.

Current Call: Select this type if you want to ignore all threads that are making a call to the selected function.

The Rule Value should contain the class name, method, followed by class+method. An example of a Current Call is weblogic.socket.PosixSocketMuxer->processSockets. An example of a Monitor (Waiting on Lock) is weblogic.socket.PosixSocketMuxer$1.

All threads that meet the criteria specified in the Idle Thread Rule will not appear in the View Active Threads screen.

Manage Trace Files

Use this screen to:

Delete trace files from the traces you have run.

Load a trace file from another console. You'll need to move the trace file(s) to the jamserv/trace directory for them to visible in this screen.

Figure 4-15 Manage Trace Files

Manage Users

From this screen, you can create non-admin user accounts for accessing the Oracle AD4J console.

Figure 4-16 Manage Users

Download Agent

Use this screen to download Java and database agents for deployment on remotely monitored JVMs or databases. Depending on the format supported by your application server, or if it is remote or local (on the same host as the console), you can select a war or ear file for the Java agent.

If you are running a standalone Java application then you can select the zip file. For database agents, you can select the correct one for the platform on which you are running the Oracle database to be monitored. The Java agents contain the IP address of the console. If your console IP address changes, you need to click on Rebuild WARs, download a new agent and deploy it.

Note:

The rest of this screen should be used only with instructions from Oracle support.

Figure 4-17 Download Agent

A Frequently Asked Questions

This chapter lists some of the frequently asked questions encountered while using Oracle AD4J.

Frequently Asked Questions

Some of the frequently asked questions include:

What is the meaning of "Cost"?In my console why do I see "No Data Found" in the Java tab?How do I navigate the NOC tab to get to a specific date or time period?Why are the User/Request/IP Addr fields empty in the thread view?How much repository space do I require for monitoring and for heap dumps?How do I install the AD4J Database Agent on Windows?Can I still use AD4J without a database agent?How can I check if my JVM is supported by AD4J?

Where does the Agent Store Its Log Files?

How do I Prevent the Agent from Terminating Program before Thread Execution is Completed?

What is the Meaning of Cost?

Cost represents the number of times the agent has seen a given method across all sampled threads. When the polling interval is set to 1 second, this represents approximately the total number of seconds spent in this method across all active threads seen during the total time.

In My Console, Why Do I See No Data Found in the Java Tab?

You will see No Data Found in the Java tab on the console if monitoring has not been enabled for the pool currently being viewed. To enable monitoring, do the following:

Click the Setup tab. Then click Console Setup and Enable Monitoring.

Click the Setup tab. Then click Monitoring and Start Monitoring.

Click the Setup tab. Then click JVM Pools and click on the Edit icon. Check the Poll Enabled checkbox.

You may also see this error if your browser cache is corrupted. You must ensure that the browser cache is emptied before retrying this operation.

How Do I View a Specific Period in the NOC View?

The three arrow icons on the top left of the NOC view can be used to navigate to different time periods of monitoring. The arrow pointing up is used to zoom out and increase the amount of time being viewed while the left and right arrows allow you to navigate back and forth across different time periods.

Why are the User, Request, and IP Address fields Empty in the Thread View?

Some application servers protect this data and hide it so that is not available to the AD4J Agent. This will cause the fields to appear blank. Additionally, these fields can also appear blank on an application server that is not fully supported by AD4J.

How Much Repository Space is Required for Monitoring and for Heap Dumps

In a standard monitoring setup, at least 25 - 100 MB is required initially with a default 24 hour purge interval. You must check the tablespace growth periodically and if required, you may need to change the space requirements. This will ensure that database growth due to standard monitoring will occur smoothly without sudden spikes.

However, there are 2 things that can drastically affect your tablespace:

Heap Dumps: Analyzing heaps requires a large amount of tablespace. As a standard practice, we recommend that you must have 5 times the size of heap dump file being loaded in your tablespace. Since you know the size of your dump file, make sure that there is adequate space to accommodate the dump file before it is loaded into the database.

Thread Traces: While these are smaller than heaps. they are loaded into the database automatically when a user initiates a trace at the console. The size of these threads can vary dramatically depending on the number of active threads during the trace, the duration of the trace, and the sample interval of the trace. This should usually be under 100MB but if several thread traces have been initiated, it could fill up the database quickly. Before initiating the traces, you must ensure that there is adequate space in the database.

How Do I Install the AD4J Database Agent on Windows?

In this release, the AD4J Database Agent cannot be installed on Windows.

Can I Still Use AD4J Without a Database Agent?

Most AD4J functions for monitoring JVMs and databases will work properly without a database agent. But if you encounter a thread that is in the DB Wait state, it will not be a hyperlink. Therefore, you cannot follow the thread into the database and see its database session information including the SQL that it executes. Since the only function of the database agent is to provide cross-tier correlation, the information in the database tab will not be impacted.

How Can I Check if my JVM is Supported by AD4J?

The supported JVMs are listed in the README.TXT file available at http://www.oracle.com/technology/software/products/oem/htdocs/jade.html.

Where does the Agent Store Its Log Files?

All agent logging is done to the STDERR stream which the Application Server redirects to a file. Refer to the Application Server documentation for details on the location of the file in which the STDERR messages are logged.

How do I Prevent Agent from Terminating Program before Thread Execution is Completed?

While monitoring a standalone program with the AD4J agent, the program may get terminated before all the threads have been executed. To prevent this from happening, you need to add jamisdaemon parameter and set the value as jamisdaemon=true. This parameter wil prevent the agent from exiting before all the threads have been completely executed.

This is the Enterprise Manager Setup page.

This is the Collaboration Suite Service Home page.

The Active Sessions Waiting page shows the Active Sessions Waiting chart, a Top SQL table, and a Top Sessions table.

The screen capture goups_group_charts.gif illustrates the Charts tab of the Group page. Other tab choices are Home, Administration, and Members. This Group Charts graphic shows three charts with data. The charts that appear in this page are determined by your selections in the Create Group Charts page. The graphic also shows accompanying legends below the charts that you can use to drill down for more detailed information.

End of description.

This is the Collaboration Suite Service Topology page.

This is the Host Operating System Details page.

Figure shows the Management Plug-ins page with an imported Management Plug-in Archive.

This is the Enterprise Manager Select Patch page.

This is the Clone Oracle Home: Product Settings page.

This figure shows the metric details page that appears after the user has clicked on the hyper linked alert message.

This is the Enterprise Manager Host Home page.

The Metrics Baslines page shows the main entry-point page, where users can select one of three types of baselines: no active basline, moving window baseline, or static metric baseline.

This is the Access Manager's Access Server Home page.

Figure shows the Deploy Management Plug-in page with both Agent and Management Plug-in specified.

The figure shows the metric details displaying comparative metric data for two targets.

The ADDM page shows the Active Sessions chart and a Performance Anaysis chart at the bottom that indicates the impact percentage, findings with drilldowns, and recommendations.

The sections in the Database Home page from left to right, top to bottom are: General (Status, Up Since, Instance Name, Version, Host, and Listener), the Host CPU bar graph, Active Sessions bar graph, SQL Response Time bar chart, Diagnostic Summary, Space Summary statistics, and High Availability.

Following are tables listing the alerts and related alerts. The table columns are Severity, Category, Name, Message, and Alert Triggered. Following this table are summary sections for Policy Violations, Security, Job Activity, and Scheduled Executions.

End of description.

Figure shows a default target home page for a newly added SQL Server target.

The screen capture job_summary.gif illustrates the Summary information on the Grid Control Console Page. At the top of the screen capture is the View list. The Status section follows listing the number of Total Monitored Targets. The All Targets Availability section provides a pie chart with associated legend.

The All Targets Alerts section lists the Critical alerts, Warning alerts, and Errors. The All Targets Jobs section lists the Problem Executions and Suspended Executions statistics.

End of description.

The figure em2go_logon.gif illustrates a personal digital assistant (PDA) with the EM2Go logon screen. The logon screen shows the User Name and Password prompts and shows the Login button.

End of description.

The Top Activity page shows the Active Sessions chart along with a table that shows Top SQL, and another table that shows Top Sessions.

This is the Enterprise Manager System Topology page.

This is the Creating Software Components Using Enterprise Manager User Interface figure.

End of description.

The screen capture groups_group_members.gif illustrates the Members tab of the Group page. Other tab choices are Home, Charts, and Administration. This Group Members graphic shows all of the target members you selected in the Create Group Members page and their status, policy violations, wait time, compliance score, deployment type, and location. This information appears in tabular format.

End of description.

The Activity page of SQL Details shows the Active Sessions chart along with a table showing details for a selected 5-minute interval.

This is the Enterprise Manager Service Topology page.

This is the BEA WebLogic Cluster Home page.

This is the Enterprise Manager Host Performance page.

The Cluster Interconnects page shows three tables: Interfaces by Hosts, Interfaces in Use by Cluster Databases, and Hosts.

End of description.

This is a depiction of the Lifecycle Management Overview

End of description.

Graphic shows an out-of-box Availability History report for a group of 4 databases.

End of description.

This is the Enterprise Manager System Home page.

The Top Consumers Top Modules page shows several buttons, including Enable Aggregation and Enable SQL Trace, along with a table that shows columns for the service name, module name, and Activity percentage, among others.

This is the Enterprise Manager Grid Control console.

This is the Data Masking Workflow figure.

This is the Enterprise Manager Availability History page.

The figure em2go_home.gif illustrates a personal digital assistant (PDA) with the EM2Go home page. At the top of the page is a list from which to search targets and the Go button. Following is the Alerts and Availability section listing: Critical, Warning, Down, Errors, and Unknown. The Targets section lists the targets by category: hosts, database, application servers, Web applications, Groups, and All Targets. The top of the Related Links section displays.

End of description.

The Create Service page shows sections where you can configure high availability, service properties, notification properties, service threshold levels, and resource management properties.

End of description.

This is the Enterprise Manager Services Dashboard.

This figure shows the Identify System Home page.

The screen capture groups_group_admin.gif illustrates the Administration tab of the Group page. Other tab choices are Home, Charts, and Members. This Group Administration graphic shows a Job Activity table, Blackouts table, Database Operations links (Execute SQL, Alert Log Content, and View Backup Report), a Deployments Summary drop-down list, and a list of software targets without inventory. The graphic also shows a drop-down list with several choices for configuration searches.

End of description.

This is the Enterprise Manager Host Hardware Details page.

This screen shows details about the deployed applications.

End of description.

This is the Enterprise Manager Policy Trend Overview page.

The screen capture groups_group_home.gif illustrates the Home tab of the Group page. Other tab choices are Charts, Administration, and Members. This Group Home graphic shows a Status pie chart, Alerts table, Policy Violations table, Security Policy Violations table, and Configuration Changes table. The graphic also shows if there are critical patch advisories for Oracle Homes.

End of description.

This is the Enterprise Manager Historical SQL page.

Figure shows the Report page for a SQL Server target.

The Database Performance page shows four line charts: Host, Average Active Sessions, Instance Disk I/O, and Instance Throughput.

End of description.

The Cluster Cache Coherency page shows three charts: Global Cache Block Access Latency, Global Cache Block Transfer Rate, and Global Cache Block Transfers and Physical Reads. Radio buttons at the top of the page enable you to select graphical charts or a tabular format.

End of description.

Figure shows the Management Plug-in Import page with a sample archive file.

The Instance Activity Cursors page shows a chart with performance data for metrics. There are tabs for other Instance Activity pages.

The Topology for SQL Details Plan shows the text of the SQL statement and the components in the Topology Viewer main window with associations indicated with connecting lines.

The figure shows the Alert Details page for the Filesystem Space Available metric.

End of description.

This is the Warning Alerts page with system alerts.

This is the Enterprise Manager Host Configuration page.

This is the Enterprise Manager Host Storage Details page.

The screen capture job_activity.gif illustrates the Job Activity page. At the top left of the page is the Search section listing: the Name, Owner, Status, and Scheduled Start. The top right part of the page lists the Job Type, Target Type, and Target Name.

At the bottom of the page is the Results table. The columns in the table are: Select, Name, Status, Scheduled, Targets, Target Type, Owner, Job Type, and Repeating.

End of description.

This is the Enterprise Manager System Dashboard.

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2010, Oracle and/or its affiliates. All rights reserved.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

Hazardous Applications Notice

This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

Trademark Notice

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Third-Party Content, Products, and Services Disclaimer

This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.