PeopleSoft Admin Help for all

This space is for all those who work on PeopleSoft Enterprise as PeopleSoft Admin / DBA. You can share your findings, thoughts, problems....etc. Only condition is that you must be related to PeopleSoft Admin / DBA activities some way..

Tuesday, July 14, 2009

How to trace Application Engines from 8.4 onwards !!

How to trace Application Engines from 8.4?

SUMMARY:
PROCEDURE A: On the PIA *
PROCEDURE B: On the Process Scheduler *

NOTE 1: Tracing activated for one Application Engine or all Application Engines
On the PIA, you can activate tracing for a particular Application Engine.
When activating tracing on the Client or on the Process Scheduler, any Application Engine run will generate a trace file.

NOTE 2: Push button
If you want to trace an Application Engine triggered via a push button, follow procedure B but for the Application Server.

NOTE 3: PSJob
The procedures can also be used if the Application Engine you want to trace is run via a PSJob.
PROCEDURE A: On the PIA
A.1.Sign in the PIA.

A.2.Navigate to the ‘Processes’ component and select the Application Engine that you would like to get a trace on.

A.3.Go to the ‘Override Options’ tab, set the ‘Parameter List’ option to ‘Append’, and add the tracing flags as explained below.
You can turn on tracing for the Application Engine itself, for the SQL statements run or the PeopleCode run by the Application Engine, or a combination of the three.
Application Engine tracing:
Add the sum of all the options you want to use at the end of the parameter list and precede the number by ‘–TRACE + a space’. For example:
-TRACE 391
Here is the list of options and associated numbers for each option:
1 Initiate the Application Engine Step trace
2 Initiate the Application Engine SQL trace
4 Trace dedicated Temp Table Allocation to AET file
128 Initiate the Statement Timings trace to file, which is similar to the COBOL timings trace to file
256 Initiate the PeopleCode Detail to the file for the Timings trace
1024 Initiate the Statement Timings trace, but, instead of writing to the trace file, this trace stores the results in the following tables: PS_BAT_TIMINGS_LOG and PS_BAT_TIMINGS_DTL
2048 Adding this value requests a database optimizer trace file
4096 Request a database optimizer to be inserted in the Explain Plan Table of the current database
8192 This value sets a trace for Integration Broker transform programs
To turn traces on, sum all the options you want to use and enter the results at the end of the parameter list and precede the number by ‘–TRACE + a space’ as shown above. For example, you should use 391 (1+2+4+128+256) to trace what is shown in bold above.

SQL tracing:
Add the sum of all the options you want to use at the end of the parameter list and precede the number by ‘–TOOLSTRACESQL + a space’. For example:
-TOOLSTRACESQL 135
Here is the list of options and associated numbers for each option:
1 Trace SQL statements
2 Trace SQL statement variables
4 Trace SQL connect, disconnect, commit and rollback
8 Show fetched rows (indicates that it occurred, not data)
16 Show all other API calls except ssb
32 Set Select Buffers (identifies the attributes of columns to be selected).
64 Show database API specific calls
128 Show COBOL statement timings
256 Show Sybase bind information
512 Show Sybase fetch information
4096 Show manager information
8192 Show Mapcore information
To turn traces on, sum all the options you want to use and enter the results at the end of the parameter list and precede the number by ‘–TOOLSTRACESQL + a space’ as shown above. For example, you should use 135 (1+2+4+128) to trace what is shown in bold above.

PeopleCode tracing:
Add the sum of all the options you want to use at the end of the parameter list and precede the number by ‘–TOOLSTRACEPC + a space’. For example:
-TOOLSTRACEPC 2012
Here is the list of options and associated numbers for each option:
1 Trace instructions
2 List the program
4 Show assignments to variables
8 Show fetched values
16 Show stack
64 Trace start of programs
128 Trace external function calls
256 Trace internal function calls
512 Show parameter values
1024 Show function return values
2048 Trace each statement in program
To turn traces on, sum all the options you want to use and enter the results at the end of the parameter list and precede the number by ‘–TOOLSTRACEPC + a space’ as shown above. For example, you should use 2012 (4+8+16+64+128+256+512+1024) to trace what is shown in bold above.

Combined tracing:
It is possible to combine the three types of trace above. Here are a few examples:
-TRACE 391 -TOOLSTRACESQL 135
-TRACE 391 -TOOLSTRACEPC 2012
-TRACE 391 -TOOLSTRACESQL 135 -TOOLSTRACEPC 2012


A.4.Go ahead and run the Application Engine that you would like to get a trace on.
A.5.Get the trace file.
In the ‘Process Requests’ page, click on the ‘Details’ hyperlink for your Process Instance.
In the ‘Process Detail’ page, click on the ‘View Log/Trace’ hyperlink.
A new window opens which looks like the following:
The ‘Application Engine Trace File’ is generated when using the -TRACE flag.
The ‘PeopleSoft Trace File’ is generated when using either the –TOOLSTRACESQL, the –TOOLSTRACEPC, or both flags.
NOTE to GSC analysts only: what to do if the hyperlink don’t work?
See file called ‘How to access PS_HOME on NT for GSC analysts only.doc’
Here is an example of an Application Engine trace file:
Here is an example of a SQL trace file:
Here is an example of a PeopleCode trace file:

A.6.DO NOT FORGET TO TURN TRACING OFF by setting the ‘Parameter List’ option to ‘None’ in the ‘Processes’ component – ‘Override Options’ tab (see step A.3) and saving.
PROCEDURE B: On the Process Scheduler
B.1.Stop the Process Scheduler (Note for GSC analysts only: can only be done by the LAB).

B.2.Open the ‘psprcs.cfg’ file with any text editor (Note for GSC analysts only: can only be done by the LAB).

B.3.You can turn on tracing for the Application Engine itself, for the SQL statements or the PeopleCode run by the Application Engine, or a combination of the three.

Application Engine tracing: look for the following section in the ‘psprcs.cfg’ file:
; AE Tracing Bitfield
;
; Bit Type of tracing
; --- ---------------
; 1 - Trace STEP execution sequence to AET file
; 2 - Trace Application SQL statements to AET file
; 4 - Trace Dedicated Temp Table Allocation to AET file
; 8 - not yet allocated
; 16 - not yet allocated
; 32 - not yet allocated
; 64 - not yet allocated
; 128 - Timings Report to AET file
; 256 - Method/BuiltIn detail instead of summary in AET Timings Report
; 512 - not yet allocated
; 1024 - Timings Report to tables, ignored if Process Instance is 0
; 2048 - DB optimizer trace to file
; 4096 - DB optimizer trace to tables
TraceAE=0
Sum the numbers of all the options you want to enable and set the ‘TraceAE’ parameter accordingly (Note for GSC analysts only: can only be done by the LAB). For example, you should set ‘TraceAE’ to 135 (1+2+4+128) to trace what is shown in bold above.

SQL tracing: look for the following section in the ‘psprcs.cfg’ file:
; SQL Tracing Bitfield
;
; Bit Type of tracing
; --- ---------------
; 1 - SQL statements
; 2 - SQL statement variables
; 4 - SQL connect, disconnect, commit and rollback
; 8 - Row Fetch (indicates that it occurred, not data)
; 16 - All other API calls except ssb
; 32 - Set Select Buffers (identifies the attributes of columns
; to be selected).
; 64 - Database API specific calls
; 128 - COBOL statement timings
; 256 - Sybase Bind information
; 512 - Sybase Fetch information
; 4096 - Manager information
; 8192 - Message Agent information
; Dynamic change allowed for TraceSql and TraceSqlMask
TraceSql=0
TraceSqlMask=12319
Sum the numbers of all the options you want to enable and set the ‘TraceSql’ parameter accordingly (Note for GSC analysts only: can only be done by the LAB). For example, you should set ‘TraceSql’ to 135 (1+2+4+128) to trace what is shown in bold above.
Make sure ‘TracePCMask’ is set to 1331 (Note for GSC analysts only: can only be done by the LAB). This parameter controls which of the SQL trace options requested by client machines will be written to the trace file. For example, if you set this value to 8 (Row Fetch), this option is the only one that can be traced from any client, no matter what you set for the ‘TraceSql’ parameter.

PeopleCode tracing: look for the following section in the ‘psprcs.cfg’ file:
; PeopleCode Tracing Bitfield
;
; Bit Type of tracing
; --- ---------------
; 1 - Trace instructions
; 2 - List the program
; 4 - Show assignments to variables
; 8 - Show fetched values
; 16 - Show stack
; 64 - Trace start of programs
; 128 - Trace external function calls
; 256 - Trace internal function calls
; 512 - Show parameter values
; 1024 - Show function return value
; 2048 - Trace each statement in program
; Dynamic change allowed for TracePC and TracePCMask
TracePC=0
TracePCMask=4095
Sum the numbers of all the options you want to enable and set the ‘TracePC’ parameter accordingly. For example, you should set ‘TracePC’ to 2012 (4+8+16+64+128+256+512+1024) to trace what is shown in bold above.
Make sure ‘TracePCMask’ = 4095 (Note for GSC analysts only: can only be done by the LAB). This parameter controls which of the PeopleCode trace options requested by client machines will be written to the trace file. For example, if you set this value to 8 (Show fetched values), this option is the only one that can be traced from any client, no matter what you set for the ‘TracePC’ parameter.
B.4.Save your modifications and close the file (Note for GSC analysts only: can only be done by the LAB).

B.5.Reconfigure your Process Scheduler (select option 3 in ‘psadmin’ and answer ‘No’ to the question ‘making any changes?’) and restart it (Note for GSC analysts only: can only be done by the LAB).

B.6.Sign in the PIA and run the Application Engine that you would like to get a trace on.

B.7.Get the trace file.
In the ‘Process Requests’ page, click on the ‘Details’ hyperlink for your Process Instance.
In the ‘Process Detail’ page, click on the ‘View Log/Trace’ hyperlink.
A new window will open will look like the following:
The ‘Application Engine Trace File’ is generated when ‘TraceAE’ parameter is not equal to 0.
The ‘PeopleSoft Trace File’ is generated when ‘TraceSql’ and/or ‘TracePC’ parameters are not equal to 0.
NOTE to GSC analysts only: what to do if the hyperlink don’t work?
See file called ‘How to access PS_HOME on NT for GSC analysts only.doc’
Here is an example of an Application Engine trace file:
Here is an example of a SQL trace file:
Here is an example of a PeopleCode trace file:

B.8.DO NOT FORGET TO TURN TRACING OFF by signing out, stopping the Process Scheduler, resetting the ‘TraceAE’, ‘TraceSql’ and ‘TracePC’ parameters to 0 in the ‘appsrv.cfg’ file (see step B.3), reconfiguring the Process Scheduler, and restarting it (Note for GSC analysts only: can only be done by the LAB).

1 Comments:

Blogger Unknown said...

Very well explained all the the three traces on App Engine. First place i got all the three combined.

October 4, 2009 at 11:18 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home