Oracle9iAS Forms Services Deployment Guide Release 9.0.2 Part Number A92175-01 |
|
When you develop and deploy Oracle9i Forms applications, it is helpful to have information that allows you to optimize your applications. Tracing and diagnostic tools that are available with Oracle9i Forms allow you to analyze the performance and resource consumption of your Oracle9i Forms applications at runtime. You can use trace output to diagnose performance and other problems with Oracle9i Forms applications.
The following tools are available to collect trace information for Oracle9i Forms:
This chapter describes the tracing tools and contains the following sections:
Forms Trace allows you to record information about a precisely defined part of forms functionality or a class of user actions. This is accomplished by defining events for which you want to collect trace information. For example, you can record information about trigger execution, mouse-clicks, or both.
This section on Forms Trace contains the following information:
You define the events that you want to trace in the ftrace.cfg file or in the URL when you start the trace. An event is something that happens inside Oracle9i Forms as a direct or indirect result of a user action. See "List of Traceable Events" for a list of events and their corresponding event numbers.
The ftrace.cfg file is installed in the %forms_home%/forms90/server directory by default, and the FORMS90_TRACE_PATH environment variable is set in the default.env file. (The FORMS90_TRACE_PATH environment variable specifies the location of the ftrace.cfg file and the location of trace output files.)
In a text editor, edit the ftrace.cfg configuration file to specify named event sets. An event set specifies a set of events that you can trace simply by specifying the event set name rather than each event number individually when you start the trace.
The following is a sample ftrace.cfg configuration file where two event sets have been specified.
// // example ftrace.cfg file // This file is used to specify event groups for use with Forms Trace // // The file format is // name1: event1, event2, ... , event_n // name2: event1-event_m // all: 0-199 errors: 0-3 custom1: 32-46, 65, 66, 96, 194
Note the following:
When you start the trace, you can specify tracegroup = "custom1" on the command line, which is equivalent to specifying tracegroup = "32-46, 65, 66, 96, 194"
The following command line parameters are used to configure Forms Trace:
Record = forms | otrace
Tracegroup =
Log = <filename>
You start a trace by specifying trace entries in the URL or formsweb.cfg file. Entries should include the grouping of events to collect and the trace file name. Trace collection starts when the form executes.
The following are sample URLs to start a trace:
http://cx-pc/forms90/f90servlet?form=cxl&record=forms&tracegroup=0-199 http://cx-pc/forms90/f90servlet?form=cxl&record=forms&tracegroup=mysql http://cx-pc/forms90/f90servlet?form=cxl&record=forms&tracegroup=0-199;log=run1.log
A later release of Oracle9i Forms will implement a method for starting a trace via a built-in. The most recent information regarding Oracle9i Forms, including updated documentation, whitepapers, and viewlet demonstrations, is available on OTN at http://otn.oracle.com.
Trace data is stored in a binary file with a *.trc extension. To view trace data, you must either:
The Upload/Translate utility performs two functions:
To convert trace data to XML format, on the command line, type
java oracle.forms.diagnostics.Xlate datafile=a.trc xmlfile=myfile.xml
to create myfile.xml.
To upload trace data to database tables, on the command line, type
java oracle.forms.diagnostics.Xlate datafile=a.trc userid=[password]=pw url=[server]:1521:orcl9i
to upload the trace data to the tables.
The following are valid command line options for the utility:
Scripts are provided to create tables for trace data.
Run the frmtrc.sql script on the binary trace file to create the database tables, indexes, and views. The frmtrc.sql script calls the frmtrc.tab script (to create tables), the frmtrc.con script (to create constraints), and the frmtrc.vw script (to create views).
The scripts create the following database schema for your trace data:
The following table lists the events that can be defined for tracing. In future releases of Forms, more events will be added to this list.
Event types are as follows:
* These event numbers do not have a TYPE because they are not really events, but rather details for events. For example, the State Delta is something you can choose to see - it is triggered by a real action or event.
The following tables list event details that can be defined for tracing:
Lists the error type and the details describing the error.
Event Name | Details | Number |
---|---|---|
Builtin |
BuiltinName, FormId |
96 |
User Exit |
UserExitName, FormId |
97 |
MenuCreate |
MenuName, FormID |
99 |
PLSQL |
PLSQLSTmt, FormID |
100 |
ExecQuery |
Block Name |
101 |
The servlet logging tools available with Oracle9iAS Forms Services provides the following:
This section on servlet logging tools contains the following information:
Turn on logging by:
When you turn on logging, the Listener Servlet writes log messages to the servlet log file. Examples of output for the various levels of logging are in Example Output for Each Level of Servlet Logging.
As an example, to start a performance-level trace, you would start the Oracle9i Forms application using a URL as follows:
http://yourserver/forms90/f90servlet?serverURL=/forms90/l90servlet/perf
As an example, to start session-level logging for all users, you would change the serverURL entry in the default section of the formsweb.cfg file to the following:
serverURL=/forms90/l90servlet/session
As an example, to start full diagnostics, you would start the Oracle9i Forms application using a URL as follows. Note that if you append /debug to the URL used to invoke the Forms Servlet that servlet will output debug messages to the log file too.
http://yourserver/forms90/f90servlet/debug?serverURL=/forms90/l90servlet/debug
The servlet log file is application.log. It is written to the application-deployments/forms90app directory of the OC4J instance to which Forms is deployed.
In Oracle9iAS, the full path is:
<ORACLE_HOME>/j2ee/ProductGroup2/application-deployments/forms90app/1_default_island/application.log
In Oracle9iDS, it is:
<ORACLE_HOME>/j2ee/iDS/application-deployments/forms90app/application.log
The following are examples of the type of output you will get when you use the following levels of logging:
FormsServlet init(): configFileName: d:\orant9i/forms90/server/formsweb.cfg testMode: false
Session start messages (example):
Forms session <10> started for test-pc.mycompany.com ( 138.56.98.72 ) Forms session <10> runtime process id = 373
Session end message (example):
Forms session <10> ended
Forms session <3> started for test-pc.mycompany.com ( 138.56.98.72 ) Forms session <3> runtime process id = 460 Forms session <3> ended Total duration of network exchanges: 1.041 Total number of network exchanges: 2 (1 "long" ones over 1.000 sec) Average time for one network exchange (excluding long ones): 0.030 Total bytes: sent 1,110, received 316
Forms session <3> started for test-pc.mycompany.com ( 138.56.98.72 ) Forms session <3> runtime process id = 460 Forms session <3>: request processed in 1.011 sec. Received 8 bytes,returned 8 bytes. Forms session <3>: request processed in 0.030 sec. Received 308 bytes, returned 1,102 bytes. Forms session <3> ended Total duration of network exchanges: 1.041 Total number of network exchanges: 2 (1 "long" ones over 1.000 sec) Average time for one network exchange (excluding long ones): 0.030 Total bytes: sent 1,110, received 316
Here is an example run by going to a URL like http://test-machine:8888/forms90/f90servlet/debug&config=ienative&serverURL=/forms90/l90servlet/debug):
=============== FormsServlet =============== GET request received, cmd=debug, qstring=config=ienative&serverURL=/forms90/l90servlet/debug No current servlet session File baseie.htm not found, looking in d:\orant9i/forms90/server The SSO_USERID is: null =============== FormsServlet =============== GET request received, cmd=startsession, qstring=config=ienative&serverURL= /forms90/l90servlet/debug&ifcmd=startsession No current servlet session New servlet session started SSO_USERID in startSession: null SSO_AuthType in startSession: null User DN: null Subscriber DN: null EM mode in the config file: 0 File default.env not found, looking in d:\orant9i/forms90/server envFile = d:\orant9i\forms90\server\default.env serverURL: /forms90/l90servlet/debug rewrittenURL: /forms90/l90servlet/debug;jsessionid=27f6412da05c 426ab47db4ae77636113 =============== ListenerServlet =============== GET request received, cmd=getinfo, qstring=ifcmd=getinfo&ifhost=test-pc.mycompany.com&ifip=130.35.96.71 Existing servlet session, id = 27f6412da05c426ab47db4ae77636113, not from cookie Creating new Runtime Process using default executable Starting Forms Server in EM mode startProcess: executing ifweb90 server webfile=HTTP-0,0,1 Getting stdin, stdout and stderr of child process Writing working directory to stdin: d:\orant9i\forms90 New server process created Forms session <4> started for test-pc.mycompany.com ( 138.56.98.72 ) *********************************************** Got POST request, length = 8 HTTP request headers: ACCEPT-LANGUAGE: en PRAGMA: 1 CONTENT-TYPE: application/x-www-form-urlencoded ACCEPT: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.0; Win32) HOST:test-machine:8888 CONTENT-LENGTH: 8 CONNECTION: Keep-Alive Existing servlet session, id = 27f6412da05c426ab47db4ae77636113, not from cookie Forms session <4> runtime process id = 474 Port number is 2791 RunformProcess.connect(): connected after 1 attempts Connected to ifweb process at port 2791 Forms session <4>: request processed in 1.032 sec. Received 8 bytes, returned 8 bytes. ***********************************************
Oracle Trace is part of Oracle Enterprise Manager (EM). Oracle Trace is the Oracle tool to gather and analyze the performance of the Oracle9i Database, Oracle9iAS Forms Services, and other products which implement the Oracle Trace API for tracing. To take full advantage of Oracle Trace, you must install Diagnostics Pack, one of the optional packs provided in the Oracle Enterprise Manager product suite. The Diagnostics Pack contains a set of tools to administer the Oracle Trace collections remotely through a GUI interface and to efficiently view the Oracle Trace output.
See the Oracle Enterprise Manager documentation for details.
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|