Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 









Monitoring and Load Balancing the Oracle HTTP Server (OHS)

Oracle Application Server Tips by Burleson Consulting

The HTTP Server is an important part of the Oracle9iAS architecture because a delay at this level will delay initial connection to your Oracle9iAS system and also cause delays in the generation and dispatch of outgoing HTML and XML documents.

As we noted in Chapter 1, connection to OHS required several round-trips while establishing connectivity (Figure 10.6).

Figure 10.6: OHS entry procedure

Because OHS is used at least twice during every web transaction, we must be able to identify the components of OHS processing and find a way to track each component process.  Next, let?s examine the common tools used to monitor the OHS server and report on performance metrics.

Monitoring Oracle9iAS with Dynamic Monitoring Service (dmstool)

The Dynamic Monitoring service dmstool utility is a command line program that is used to display elapsed time performance metrics.  The dmstool utility can be used to view metrics on several Oracle9iAS components:

  • OC4J ? dmstool can measure the time required to parse incoming requests and the total free RAM in the JVM.

  • Oracle9iAS Portal ? Important Portal metrics can be easily displayed.

  • Servlet code ? You can add dms metrics of any Java code to capture additional statistics.

  • Oracle HTTP Server (OHS) ? dmstool can measure the current active requests in the HTTP server.

Before we explore the command syntax for dmstool we need to note that you can use your browser to quickly look at detailed dms statistics. 

Browser-based statistics viewing

You can see the raw dmstool statistics by reviewing the httpd.conf file and finding the URL for the dms dump file.  Invoking the dms URL will display the raw dms data in your browser (Figure 10.7).  Here we issue the URL and see the dms data:

Figure 10.7: Displaying the dms raw data with your browser

You can also use URL-based queries to locate server performance data (Figure 10.8).  Here we invoke the URL and see details on the Apache server status:

Figure 10.8: Displaying the dms raw data with your browser

Extending dms for Java code

As we have noted, you can capture you own dms diagnostics.  Let?s look at how you can add dms metrics to a servlet.  In the example below we see that the prints ?This is a test? (Listing 10.5).

import javax.servlet.*;
import javax.servlet.http.*;

public class  Test  extends HttpServlet  
  public void doGet(HttpServletRequest request,   HttpServletResponse response )
    throws ServletException, IOException  
    response.getWriter().println("This is a Test. " );

Listing 10.5: Java servlet without dms

Now we can take this code and add a dms metric by importing the oracle dms instrument library and adding a display message each time the servlet is executed (Listing 10.6):

import javax.servlet.*;
import javax.servlet.http.*;
import oracle.dms.instrument.*;

public class  TestA  extends HttpServlet  
  public void doGet(HttpServletRequest request,   HttpServletResponse response )
    throws ServletException, IOException  
        Event  beginAccess  = Event.create("/ oracle / TestA / dms ",
                            " TestA Write Succeded");
   res.getWriter().println(" This is a test of Test. ");
    begin Access.occurred();

Listing 10.6: Servlet with dms instrumentation

Now that we have reviewed the basics we are ready to take a close look at issuing native dmstool commands to extract Oracle9iAS performance data.

Using dmstool commands

When using the dmstool list option (-l), you will generate a list of over 300 monitoring metrics for Oracle9iAS.  In the example below, we constrain the dmstool output to only those lines that contain the ?completed? string:


export PATH

dmstool -l |grep completed

The output of this script (Listing 10.7) will show us all of the available metrics containing the word ?completed?.  We will use this list as input to a more detailed dmstool command in the next step.


Listing 10.7:  Sample dmstool listing for completed requests

Note: the Oracle9iAS parameters are generally specified in ?Camel? notation.  This is the convention where the words are concatenated together, and all words after the first are Capitalized, creating the ?humps? which characterize Camel notation.

We can use this listing of completed operations to get counts of the total operations over a specific period of time.  Let?s use this list as input parameters for more advanced dmstool commands.

Summarizing dmstool data by time intervals

Using the dmstool with the interval option (-i) and the collection option (-c).  The dmstool command specifies the collection of 100 sets of data at 60-second intervals.

export PATH

dmstool -i 60 -c 100 \
/     \
/    \
/     \
/  > t1.lst

Here is the output from this script.  Here we see the cumulative number of operations, displayed every minute, for each handle, request and completion operation (Listing 10.8):

Sun Jul 13 20:19:43 MDT 2003

/    240320 ops
/   146504 ops
/ 56908 ops

Sun Jul 13 20:20:43 MDT 2003

/    240474 ops
/   146598 ops
/ 56948 ops
Sun Jul 13 20:21:43 MDT 2003
/    240668 ops
/   146732 ops
/ 56978 ops

Sun Jul 13 20:22:43 MDT 2003

/    240825 ops
/   146829 ops
/ 57028 ops

Listing 10.8: Display cumulative operations

By itself, this output does not show the marginal changes between time periods, but you can either write a program or paste the output into an MS-Excel spreadsheet and use the chart wizard to plot the changes (Figure 10.9).  Here is a sample of the time-based changes to the three OHS server operations counts:

Figure 10.9: Plotting dmstool output with MS-Excel

This is an excerpt from "Oracle 10g Application Server Administration Handbook" by Don Burleson and John Garmany.

If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational