| Oracle9i Application Server Performance Guide Release 2 (9.0.2) for UNIX Part Number A97380-01 |
|
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:
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 allows you to monitor Oracle9iAS and its components. Oracle Enterprise Manager shows performance metrics for Oracle9iAS components, including:
See Also:
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.
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.
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.
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.
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
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:
Raw or XML links.
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).
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.
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]metricmetric...
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.
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.
| Option | Description |
|---|---|
|
- |
By default, without the
You can specify
|
|
- |
Specifies the number of times to retrieve values when monitoring metrics. If not specified,
The |
|
- |
Using |
|
- |
Specifies the number of seconds to wait between metric retrievals. The default is 1 second. The interval argument is not used with the
Note: if the system load is high, the actual interval may vary from the interval specified using the |
|
- |
Generates a list of all metrics available. Including metric names on the command-line is not valid when using the |
|
- |
Includes all the performance metrics for the specified metric table with the name,
See Appendix A, "Oracle9iAS Performance Metrics" or run |
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.
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:
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
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.
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 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 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
|
|
![]() Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|