Oracle 9i Application Server Oracle HTTP Server powered by Apache Performance Guide
Release 1.0.2 for Windows NT

Part Number A86676-01

Library

Contents

Index

Go to previous page Go to next page

2
Monitoring Your Web Server

This chapter explains how to gather performance information from your system. This information helps you to determine the best use of your resources.

This chapter contains the following sections:

Monitoring Network Activity

You can monitor network traffic using the Network Monitor. The Network Monitor must be installed on the Windows NT Server, and the Network Monitor Agent must be installed on the workstation (client) that is to be monitored. The Network Monitor tracks and analyzes network packets transmitted between the two computers.

For information on installing and using the Network Monitor, see the Microsoft website.

Collecting Performance Data with the Performance Monitor

The Performance Monitor is a Windows utility that gathers performance statistics from your operating system and the Oracle HTTP Server. You can use it to:

Performance Monitor consumes a small amount of system resources; the amount depends on the frequency, size and location of the data being collected. On average, Performance Monitor uses 2-5 MB of memory and 1-5% CPU time.

The components you can monitor, such as physical disk, logical disk, and memory, are called objects in Performance Monitor. Each object has its own set of counters, performance indicators specific to the object. For example, to monitor the HTTP Server or a Java process, you would select the Process object and counters of interest, such as % Processor Time, % User Time, Page Faults/sec, and Working Set.

You can configure any number or combination of objects to monitor. Every system has the following objects:

Starting the Performance Monitor

To start the Performance Monitor utility:

  1. From the Start menu, select Select Programs.

  2. From the Administrative Tools menu, select Performance Monitor.

    The Performance Monitor window opens.

Creating a chart of Process Activity

The Performance Monitor Chart view displays the performance counter values in real time, on a strip chart.

To create a chart of process activity:

  1. From the View menu, select Chart.

  2. From the Edit menu, select Add to Chart.

    The Add to Chart dialog box opens.

  3. Enter or select the hostname of the computer to monitor in the Computer field. (The default is the local computer.)

  4. From the Object drop-down list, select Process.

  5. From the Instance list, select a process. (To monitor the HTTP Server, select the second Apache process. This is the child process; it contains the threads that handle requests).

  6. From the Counter list, select the counters you want. (To select multiple counters, hold down the Ctrl key as you click the counter name.)

  7. Click Add.

  8. Click Done.

    The Performance Monitor window opens with the objects and counters you selected. Figure 2-1 shows a chart view of HTTP Server (Apache) processes on two computers.

Figure 2-1 Performance Monitor chart view


Text description of perfmon.gif follows.
Text description of the illustration perfmon.gif

Logging Performance Statistics

The chart view displays the performance statistics in real time, but you can enable logging to save them to a log file.

To enable logging:

  1. From the View menu, select Log.

  2. From the Edit menu, select Add to Log.

    The Add to Log dialog box opens.

  3. Enter or select the hostname of the computer to monitor in the Computer field.

  4. Select the objects to monitor. (To select multiple objects, hold down the Ctrl key as you click the object name.)

  5. Click Add.

  6. Click Done.

  7. From the Options menu, select Log.

  8. Select the path and enter the filename of the log file to use.

  9. Select the Update Time and Interval.

  10. Click Start Log.


    Note:

    Because the Performance Monitor log files grow quickly, watch the file size and change to another log file before it becomes unmanageably large. Performance Monitor has no mechanism to monitor file sizes.  


Creating a Report or Chart of Log File Data

You can view logged performance data in chart or report format. This procedure assumes that Performance Monitor is running, with a log file status of Collecting (you have to stop the log before you can access the log file).

To create a report or chart from a log file you have saved from a prior logging session, start with Step 3.

To select data from the log file:

  1. From the Options menu, select Log.

  2. Click Stop Log.

    The display area of the window is cleared and the status changes to Closed.

  3. From the View menu, select Chart or Report.

  4. From the Options menu, select Data From.

    The Data From dialog box appears.

  5. Click the Log File radio button, and use the browse button to navigate to your log file.

    The Open Input Log File dialog box opens.

  6. Select your file and click Open.

  7. Click OK.

  8. From the Edit menu, select Time Window.

    The Input Log File Timeframe dialog box opens.

  9. Specify the start and stop times of the interval of time you are interested in, using bookmarks or the scroll bar.

  10. Click OK.

  11. From the Edit menu, select Add to Chart or Add to Report and select the objects and counters to display.

  12. Click Add.

  13. Click Done.

    The data from the selected time period appears in the chart or report.

Monitoring the Web Server

Monitoring activity on the system is essential to performance tuning. The Oracle HTTP Server provides server side status information, including current server statistics, via the mod_status module. To obtain these server status reports, you must configure the web server as described in the following sections.

Using the mod_status Utility to Monitor the Web Server

To enable monitoring, edit the httpd.conf file to replace your_domain.com with the hostname of the computer from which you want to monitor.

<Location /server-status>
SetHandler server-status
Order deny, allow
Deny from all
Allow from
your_domain.com
</Location>

Ensure that the ExtendedStatus directive is set to On, so that the maximum amount of information is displayed.

When you allow access from all domains, instead of just your_domain.com, you can monitor the server from machines outside of your domain, but be aware of the security implications of this: your server status is accessible from any site. It is probably best to specify the domain(s) from which you want to monitor your system.

With monitoring enabled, you can view current statistics from http://hostname:port/server-status where hostname:port is the hostname and port you want to monitor. These statistics help you to gain insight on how busy your system is.

The display includes:

Figure 2-2 is a screen capture of a server status page with ExtendedStatus turned on.

Figure 2-2 Server status page


Text description of servstat.gif follows.
Text description of the illustration servstat.gif

Interpreting Server Status Information

The display (with ExtendedStatus enabled) shows that 1 server is sending a reply. ThreadsPerChild is set to 50, so there are 49 idle servers (the busy server is responding to the server-status request). You can determine what stage of processing each server is in from the value in the M (Mode column).

Customizing the Server Status display

Figure 2-2 is a snapshot of a server for a moment in time. You can get updated server statistics at any interval you choose by including the refresh parameter in the server-status URL:

http://servername:port/server-status?refresh=x

where servername:port is the name of the server and port number you are monitoring, and x is an integer representing the number of seconds after which the data is refreshed. For example, specify refresh=3 to update statistics every 3 seconds.

You may also find it useful to have the statistics displayed in a machine-readable format, for processing in a data analysis or spreadsheet program. To do this, add auto to the end of the URL, as shown below:

http://servername:port/server-status?auto

Figure 2-3 Server statistics display


Text description of svstauto.gif follows.
Text description of the illustration svstauto.gif

Monitoring JServ Processes

After you start the Oracle9i Application Server, you can check to ensure that all JServ processes have started normally. If performance is degraded during operation, you can quickly determine if this is because JServ processes have terminated by looking at the Status column (each configured process has a status of Up or Down).

  1. Remove the comments in the JServ status handler section of the jserv.conf file to enable monitoring and specify the host(s) that can access JServ status (the default is localhost). Be aware of security implications when selecting the hosts that will be allowed to access status information on your system.

    	<Location /jserv/>
    	SetHandler jserv-status
    		order deny, allow
    		deny from all 
    		allow from hostname_1.com 
    		allow from hostname_2.com 
    	</Location>
    
    
    
    
  2. Type the following into your browser:

    	http://hostname:port/jserv/
    
    
    
    

The port must be the port on which the web server listens (found in the httpd.conf file).A Configured Hosts column displays links to hosts.

  • Click the host to monitor.

    The JServ status information for the host displays as shown in Figure 2-4.

    Figure 2-4 JServ status display


    Text description of jservnt.gif follows.
    Text description of the illustration jservnt.gif
    1


    Note:

    The JServ status monitor shows all of the JServ processes that are configured in the jserv.conf file, but not all of these may have been started, or any of them could be terminated. For example, 4 JServ processes are shown in Figure 2-4; all have a status of Up. If one or more had a status of Down, all 4 would still be displayed.  



    Note:

    The Status column is populated only for processes that are started in manual mode. It is not populated for a single process started in automatic mode.  


    The symbols that appear in parentheses after the word Up or Down have the following meanings:

    Symbol  Meaning 

    + 

    The process is running.  

    - 

    The process is stopped. 

    X 

    The process was terminated in a harsh shutdown. (existing requests were not handled before the process was terminated).  

    / 

    The process was terminated in a graceful shutdown (existing requests were handled before the process was terminated).  


  • Go to previous page Go to next page
    Oracle
    Copyright © 2000 Oracle Corporation.

    All Rights Reserved.

    Library

    Contents

    Index