About Tracing and Diagnostics in Oracle Forms
The terms diagnostics, logging and performance instrumentation are often used to describe very similar functionality – recording information about an application whilst it is running, either to help resolve some kind of problem or to provide information about the execution path through the application. The new tracing feature will replace FRD and the performance collector (PECS), which are no longer supported in Oracle Forms. This demonstration shows the use of the tracing and diagnostics that are available in the new Forms Trace.
How To Trace a Forms Application/module
It is recommended that you read the Trace & Diagnostics chapter in the OracleAS Forms Services Deployment Guide before attempting to demonstrate this Forms module to customers. The Deployment Guide is available on OTN.
Short description of how to use the new Forms Trace
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 Oracle Forms as a direct or indirect result of a user action. The ftrace.cfg file is installed in the %ORACLE_HOME%/forms/server directory.
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
//
all: 0-199
errors: 0-3
custom1: 32-46, 65, 66, 96, 194
The following command line parameters are used to configure Forms Trace:
Record = forms
Tracegroup =
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/forms\/frmservlet?form=cxl&record=forms&tracegroup=0-199
http://cx-pc/forms\/frmservlet?form=cxl&record=forms&tracegroup=mysql
http://cx-pc/forms\/frmservlet?form=cxl&record=forms&tracegroup=0-23,mysql
Trace data is stored in a binary file with a *.trc extension. To view trace data, you must use the Upload/Translate utility to convert the data in the *.trc file to XML or HTML format, and then view the data using an XML viewer (most browsers can display XML) or browser for the HTML format.
To convert trace data to XML format, on the command line, type:
java oracle.forms.diagnostics.Xlate datafile=forms_PID.trc output=myfile.xml OutputClass=WriteOut
to create myfile.xml.
To convert trace data to HTML format, on the command line, type:
java oracle.forms.diagnostics.Xlate datafile=forms_PID.trc output=myfile.html OutputClass=WriteOutHTML
to create myfile.html.
About the Trace Demo
If you start up the demo you will see that it contains of five (5) tabs - Errors, User Actions, Forms Events, Detailed Events, 3Tier Events - which corresponds to the different event types that are available in Forms Trace. On each tab there is a list of event and event numbers that can be traced. By default this demo is setup to trace all events available in Forms Trace. Open the formsweb.cfg (%ORACLE_HOME%/forms/server/) fi le and scroll down to the section called [featuredemo_trace] and you will see that the tracegroup is set to 1-199. These are all the predefined events that are setup for use within Forms Trace. You can set your own events by changing the numbers in the tracegroup, or by simply adding the parameter to the URL when running the demo form, which will override the default value.
The demo include not only a forms module, it also includes several configuration files, batch file, and directories.
Below is a list of files and configurations used during the demonstration:
To Run the Trace Demo
By default there should not be any steps to perform before running the demo. The Forms Trace will start the same moment you launch the demo, and the resulting output will be printed to the %ORACLE_HOM%/forms\/trace directory. To create some output just play around in the form, which will cause the form to perform some actions. Each action will be traced and stored in the form_PID.trc file. For example on the User Actions tab you can see a list of user actions, and some corresponding examples. To generate a trace just click on any of the examples e.g. table, menu, or button.
It's recommended that you modify the tracegroup in order to minimize the output, so the resulting trace information becomes more readable.
To Show the Resulting Trace Information