Skip Headers

Oracle9i Application Server Performance Guide
Release 2 (9.0.2) for UNIX

Part Number A95102-01
Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

2
Monitoring Oracle9iAS

This chapter discusses how to monitor the performance of Oracle9iAS and its components. Obtaining performance data can assist you in tuning Oracle9iAS or in tuning and debugging applications with performance problems.

This chapter contains the following topics:

Overview of Monitoring Oracle9iAS

This section describes how to use the available tools for performance monitoring. You can monitor Oracle9iAS and its components using one or more of the following:

Oracle Enterprise Manager

Oracle Enterprise Manager allows you to monitor Oracle9iAS and its components. Oracle Enterprise Manager shows performance metrics for Oracle9iAS components, including:

Oracle9iAS Built-in Performance Metrics

Oracle9iAS automatically measures runtime performance and collects metrics for the Oracle HTTP Server including child servers and Oracle9iAS Containers for J2EE (OC4J) servers. The Oracle9iAS performance metrics are measured automatically and continuously using performance instrumentation inserted into the implementations of Oracle9iAS components. The performance metrics are automatically enabled; you do not need to set options or perform any extra configuration to collect the performance metrics.

The Oracle HTTP Server performance metrics enable you to do the following:

The OC4J performance metrics allow you to monitor the performance of J2EE containers and enable you to do the following:

You can use the performance metrics while troubleshooting Oracle9iAS components to help locate bottlenecks, identify resource availability issues, or help tune your components to improve throughput and response times.


Note:

You can use the commands that access the built-in metrics in scripts or in combination with other monitoring tools to gather performance data or to check application performance.


Native Operating System Performance Commands

In order to solve performance problems or to monitor your system's activity, you can use the available native operating system commands. Native operating system commands allow you to gather and monitor CPU utilization, paging activity, swapping, and other system activity information.

See Also:

Refer to the system level documentation for information on native operating system monitoring commands.

Network Performance Monitoring Tools

You can use network monitoring tools to verify the status of requests that access your Oracle9iAS components. Tools are available that allow you to examine and save network traffic information. These tools can be helpful in analyzing and solving performance problems.

Using Oracle9iAS Built-in Performance Metrics

You can monitor Oracle9iAS performance using Oracle Enterprise Manager or by viewing the Oracle9iAS built-in performance metrics.

This section describes how to view the Oracle9iAS built-in performance metrics using the AggreSpy servlet or using the dmstool command. Table 2-1 briefly describes these methods for viewing the built-in performance metrics.

Table 2-1  Oracle9iAS Built-in Monitoring Commands
Command Description

AggreSpy

AggreSpy is a pre-packaged servlet that reports performance metrics. AggreSpy reports performance data for an Oracle9iAS instance. You can only run AggreSpy when an OC4J instance is configured to support it. By default, the OC4J home instance supports AggreSpy.

dmstool

Allows you to monitor a specific performance metric, a set of performance metrics, or all performance metrics. Options allow you to specify a reporting interval to report the requested metrics every t seconds. This command also allows you to report all the built-in performance metrics on your site.

dmstool is located in the $ORACLE_HOME/bin directory.

See Also:

Viewing Performance Metrics Using AggreSpy

The AggreSpy servlet displays Oracle HTTP Server and OC4J performance metrics. AggreSpy provides output using easy to read HTML tables and includes OC4J metrics from multiple OC4J instances when multiple OC4Js are running.

The tables containing built-in metrics in Oracle9iAS are identified by a name, such as ohs_server for the Oracle HTTP Server metrics. In the text in this guide we refer to the built-in performance metric table names as metric tables.

You can access performance metrics using AggreSpy from the following URL:

http://myhost:myport/dmsoc4j/AggreSpy


Note:

You can only run AggreSpy when an OC4J instance is configured to support it, and the instance is running. By default, the OC4J home instance supports AggreSpy.


Figure 2-1 shows a sample AggreSpy response. The AggreSpy response shows two frames, one containing a list of metric tables on the left, and one showing the selected performance metric with current values on the right.

AggreSpy provides navigation and display options, including:

AggreSpy caches performance data so the AggreSpy metric values reported may not always contain the most current data. AggreSpy refreshes metrics based on how often data values are accessed (values are refreshed at most every 15 seconds).


Note:

Refresh your browser to display built-in metric data after you start AggreSpy. When you first use AggreSpy many of the fields, and the complete list of metric tables may not contain data or may be shown as blanks. If you wait a short time, and then refresh the display, the data is available and data values are shown.


AggreSpy URL and Access Control

By default, the dmsoc4j/AggreSpy URL is protected, and access to metrics is only allowed from the localhost. If you want to view metrics from a system other than the localhost, then you need to change the access control for dmsoc4j by editing the ORACLE_HOME/Apache/Apache/conf/mod_oc4j.conf file on your Oracle HTTP Server.

The default path for the AggreSpy servlet is dmsoc4j/AggreSpy. If the URL for the dmsoc4j application is changed or the default application is disabled, then you need to update the ORACLE_HOME/Apache/Apache/conf/mod_oc4j.conf file to determine the valid path for accessing the AggreSpy servlet.

See Also:

  • Oracle HTTP Server Administration Guide for information on configuring mod_oc4j

  • Oracle9i Application Server Security Guide for information on Oracle HTTP Server access control

Figure 2-1 AggreSpy Performance Metric Display

Text description of aggrespy.gif follows.

Text description of the illustration aggrespy.gif

Viewing Performance Metrics Using dmstool

The dmstool command allows you to view a specific performance metric, a set of performance metrics, or all performance metrics. The dmstool command also supports an option that allows you to set a reporting interval, specified in seconds, to report updated metrics every t seconds.

For example, you can monitor the performance of a specific servlet, JSP, EJB, EJB method, or database connection and you can request periodic snapshots of metrics specific to these components.

The format for using dmstool to display built-in performance metrics is:

% dmstool [options] metric metric ...

or

% dmstool [options] -list

or

% dmstool [options] -dump

Table 2-2 lists the dmstool command-line options. Following Table 2-2 this section presents examples that show sample usage with specific performance metrics. The dmstool is located in the $ORACLE_HOME/bin directory.


Note:

You can use dmstool in scripts or in combination with other monitoring tools to gather performance data, to check application performance, or to build tools that modify your system based on the values of performance metrics.


Access Control for dmstool

By default, the dmstool only can obtain metrics when it is run from the localhost. If you want to view metrics from an Oracle HTTP Server running on a remote host, then you need to use dmstool with the -a option and change the access control for /dms0 by editing the $ORACLE_HOME/Apache/Apache/conf/httpd.conf file on your Oracle HTTP Server.

Table 2-2  dmstool Command-line Options
Option Description

-a[ddress] host[:port]

By default, without the -a option, dmstool gets metrics from the localhost. When the Oracle HTTP Server is running on the same system as dmstool, the -a option is not required.

You can specify -a multiple times on the command line to monitor a cluster.

host is the domain name or IP address of the host on which the Oracle HTTP Server is running.

port specifies the OPMN request port that supplies the metrics. The request port is specified in $ORACLE_HOME/opmn/conf/opmn.xml, for example:

<notification-server>
<port local="6100" remote="6200" request="6003"/>
<log-file path="/private/oracle/opmn/logs/ons.log" level="3"/>
</notification-server>

-c[ount] num

Specifies the number of times to retrieve values when monitoring metrics. If not specified, dmstool continues retrieving metric values until the process is stopped.

The -count option is not used with the -list option.

-dump

Using dmstool with the -dump option reports all the metrics from an Oracle9iAS instance on the standard output. Oracle recommends that you run with the -dump option periodically, such as every 10 to 15 minutes, to capture and save a record of performance data for your Oracle9iAS server.

-i[nterval] secs

Specifies the number of seconds to wait between metric retrievals. The default is 1 second. The interval argument is not used with the -list option. The interval specified is approximate.

Note: if the system load is high, the actual interval may vary from the interval specified using the -interval option.

-l[ist]

Generates a list of all metrics available. Including metric names on the command-line is not valid when using the -list option with dmstool.

-table metric_table

Includes all the performance metrics for the specified metric table with the name, metric_table.

See Appendix A, "Oracle9iAS Performance Metrics" or run AggreSpy for a list of metric table names.

Using dmstool to List the Names of All Metrics

Every Oracle9iAS performance metric has a unique name. Using dmstool with the -list option produces a list of all metric names. The -list output contains the metric names that you can use with dmstool to request monitoring information for a specific metric or set of metrics.

Using the following command, dmstool displays a list of all metrics available on the Oracle HTTP Server:

% dmstool -list

This command displays a list of the available metrics.

See Also:

Appendix A, "Oracle9iAS Performance Metrics"

Using dmstool to Report Specific Performance Metrics

To monitor a specific metric or set of metrics, use dmstool and include the metric name on the command-line. For example, to monitor the time the JVM has been running, perform the following steps:

  1. Use dmstool with the -list option to find the full name of the metric that shows the JVM uptime:

    % dmstool -list | grep JVM/upTime.value
    /myhost/OC4J:3000:6003/JVM/upTime.value
    
    
    
  2. Use dmstool and supply the full metric name as an argument to show the metric's current value:

    % dmstool /myhost/OC4J:3000:6003/JVM/upTime.value 
    Tue Apr 02 16:27:32 PST 2002
    /myhost/OC4J:3000:6003/JVM/upTime.value       23991009 msecs
    
    

Suppose you are trying to balance the load on your host across two OC4J processes and you want to monitor the number of requests handled by each OC4J over time. If you generate a list of the available metrics using the dmstool -list command, and search the list for information on OC4J, you should find metric names such as:

/myhost/OC4J:3000:6003/oc4j/default/WEBs/default/processRequest.completed
/myhost/OC4J:3000:6003/oc4j/default/WEBs/processRequest.completed
/myhost/OC4J:3001:6003/oc4j/default/WEBs/default/processRequest.completed
/myhost/OC4J:3001:6003/oc4j/default/WEBs/processRequest.completed
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojsp/JSPs/processRequest.completed
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojsp/processRequest.completed
/myhost/OC4J:3001:6003/oc4j/ojsp/WEBs/processRequest.completed

This dmstool -list output shows that the site contains two OC4J processes. The OC4J listening on AJP port 3000 is running an application called default, while the OC4J listening on port AJP 3001 is running an application called ojsp. JSPs have been accessed in the ojsp application but not in the default application.

Using dmstool With the Interval and Count Options

To monitor the load balance between the two identified OC4J processes for two hours, use the following command, supplying multiple metric names on the command-line:

% dmstool -i 60 -c 120 \
/myhost/OC4J:3000:6003/oc4j/default/WEBs/default/processRequest.completed \
/myhost/OC4J:3000:6003/oc4j/default/WEBs/processRequest.completed \
/myhost/OC4J:3001:6003/oc4j/default/WEBs/default/processRequest.completed \
/myhost/OC4J:3001:6003/oc4j/default/WEBs/processRequest.completed \
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojsp/JSPs/processRequest.completed \
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojsp/processRequest.completed \
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/processRequest.completed

This command reports 120 sets of output for the metrics listed on the command line, as specified with the -c option, while collecting data at intervals of 60 seconds:

Mon Nov 19 17:13:01 PDT 2001
/myhost/OC4J:3000:6003/oc4j/default/WEBs/default/processRequest.completed           437 ops
/myhost/OC4J:3000:6003/oc4j/default/WEBs/processRequest.completed                   441 ops
/myhost/OC4J:3001:6003/oc4j/default/WEBs/default/processRequest.completed           432 ops
/myhost/OC4J:3001:6003/oc4j/default/WEBs/processRequest.completed                   436 ops
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojspdemos/JSPs/processRequest.completed  452 ops
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojspdemos/processRequest.completed       425 ops
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/processRequest.completed                 455 ops

Mon Nov 19 17:14:01 PDT 2001
/myhost/OC4J:3000:6003/oc4j/default/WEBs/default/processRequest.completed           452 ops
/myhost/OC4J:3000:6003/oc4j/default/WEBs/processRequest.completed                   470 ops
/myhost/OC4J:3001:6003/oc4j/default/WEBs/default/processRequest.completed           462 ops
/myhost/OC4J:3001:6003/oc4j/default/WEBs/processRequest.completed                   451 ops
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojspdemos/JSPs/processRequest.completed  469 ops
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/ojspdemos/processRequest.completed       452 ops
/myhost/OC4J:3001:6003/oc4j/ojspdemos/WEBs/processRequest.completed                 472 ops
.
.
.

Using dmstool to Report All Metrics with Metric Values

Using dmstool with the -dump option reports all the metrics from an Oracle9iAS instance to the standard output.

The following command displays all available metrics and metric values on the Oracle HTTP Server:

% dmstool -dump

Oracle recommends that you run dmstool with the -dump option periodically, such as every 10 to 15 minutes, to capture and save a record of performance data for your Oracle9iAS server. If you save performance data over time, this data can assist you if you need to analyze system behavior to improve performance, or when problems occur.

Using dmstool to View Metrics on a Remote Oracle9iAS System

Using dmstool with the -a option reports all the metrics from a remote Oracle9iAS instance.

The following command displays all available metrics and metric values on the Oracle HTTP Server for the given address, as specified with the -a option:

% dmstool -a system1:6003 -list


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index