Docstoc

Tracing in PSFT 8

Document Sample
Tracing in PSFT 8 Powered By Docstoc
					        Tracing and Debugging in PeopleSoft 8




                                                  PeopleSoft 8
                                              Implementation Planning
                                             Tracing and Debugging
                                                        &
                                                 Strategy Workshop




Jim Pastorino, PeopleSoft Global Support Center, June 3, 2002.
TABLE OF CONTENTS
OVERVIEW................................................................................................................................................................. 4
       PeopleTools Tracing Options ................................................................................................................................ 4
SETTING TRACE OPTIONS ON THE TRACE TAB OF THE CONFIGURATION MANAGER .................. 5
   CONFIGURATION MANAGER ........................................................................................................................................ 5
   ACCESSING THE CONFIGURATION MANAGER ............................................................................................................... 5
   THE TRACE TAB OF THE CONFIGURATION MANAGER.................................................................................................... 6
   HOW TO START A TRACE ............................................................................................................................................. 7
SETTING TRACE OPTIONS ONLINE FROM THE UTILITIES MENU........................................................... 7
   TRACE UTILITIES ......................................................................................................................................................... 7
PEOPLECODE TRACE UTILITY ........................................................................................................................... 8
     How enable/disable a peoplecode trace online ..................................................................................................... 8
     other notes regarding peoplecode trace ................................................................................................................ 8
   TRACE SQL UTILITY ..................................................................................................................................................... 9
     How to enable/disable a sql trace ......................................................................................................................... 9
     other notes regarding sql trace.............................................................................................................................. 9
APPLICATION ENGINE TRACE (AET) .............................................................................................................. 10
   AET FROM A DOS COMMAND LINE ........................................................................................................................ 10
   TRACE VALUES AND WHAT THEY DO ........................................................................................................................ 11
   RUNNING AET BY EDITING THE PROCESS DEFINTION ................................................................................................ 12
   ENABLING AET BY SETTING PARAMETERS IN SERVER CONFIGURATION FILES ........................................................ 13
   LOCATING THE TRACE FILE ...................................................................................................................................... 14
TURNING ON TRACE FOR A PIA SESSION ...................................................................................................... 14

APPLICATION SERVER TRACING OPTIONS .................................................................................................. 16
       LogFence ............................................................................................................................................................. 16
       Trace .................................................................................................................................................................... 16
TRACING FROM THE PROCESS SCHEDULER ............................................................................................... 19
       Logging Levels..................................................................................................................................................... 19
       SQL Trace File .................................................................................................................................................... 20
       Log and SQL Trace File NameS in Windows NT/2000 and UNIX ...................................................................... 20
       Distribution Agent Logging System ..................................................................................................................... 21
PEOPLECODE DEBUGGER FOR PIA ................................................................................................................. 21
       Summary .............................................................................................................................................................. 21
       Installing The PeopleTools Environment ............................................................................................................ 22
       Setting up the Debug Broker Class and Debug User Account ............................................................................ 22
       Setting up the Application Server for Debugging ................................................................................................ 25
       Configuring the Web Server ................................................................................................................................ 26
       Configuring the Workstation ............................................................................................................................... 27




                                                                  Page 2
Testing the Peoplecode Debugging Environment ................................................................................................ 27




                                                 Page 3
OVERVIEW
PeopleTools Tracing Options
PeopleSoft provides tracing options for various parts of the PeopleTools system, such as SQL statements,
PeopleCode, Application Server, Process Scheduler and Application Engine. If you are involved with supporting any
of these components, you will want to make yourself familiar with these options. These trace options are set in
various places including the Trace tab of the Configuration Manager, through the PeopleTools Utilities page, by
turning on PIA trace, from a command line and by editing the psappsrv.cfg and psprcs.cfg files.

This document will step you through each of the options described above.




                                          Page 4
SETTING TRACE OPTIONS ON THE TRACE TAB OF THE
CONFIGURATION MANAGER

CONFIGURATION MANAGER
The Configuration Manager is a PeopleTool designed to simplify workstation administration by providing a way to
adjust the PeopleSoft registry settings from one central location. With the Configuration Manager you can set up one
workstation to reflect the environment at your site, and then you can export the configuration file, which can be
shared among all the workstations at your site.

The Configuration Manager contains a variety of setting controls that allow you to set up your workstations for
connecting to the database, using workflow, set tracing options for various parts of the PeopleTools system, and so
on. It enables you to define separate "profiles" for connecting to different PeopleSoft databases.

Please note that any changes to the Configuration Manager only take place the next time you launch PeopleTools.


ACCESSING THE CONFIGURATION MANAGER
You can start Configuration Manager by double-clicking the Configuration Manager shortcut, in your PeopleSoft
program group. It's also possible to start the program online by selecting Edit, Preferences, and Configuration from
within a PeopleSoft application.

Once the Configuration Manager appears, click on the Trace tab.




                                           Page 5
THE TRACE TAB OF THE CONFIGURATION MANAGER
The Trace tab of the Configuration Manager is where you will set the tracing options for various parts of the
PeopleTools system. The Trace tab of the Configuration Manager is comprised of six sections:
 SQL Trace
 PeopleCode Trace
 Application Engine Trace
 PeopleSoft API Trace
 PeopleTools Trace File
 PeopleCode Debugger




                                           Page 6
HOW TO START A TRACE
Now that you are on the Trace tab of the Configuration Manager, starting a Trace is easy. Simply follow the steps
below to create a trace file.

1.   Select your trace options.
     Using your cursor, click on the check box next to the option(s) you would like to trace.
2.   Select the output location for the Trace file.
     The default filename for the PeopleTools Trace File is DBG1.TMP. The system writes the file to the following
     directories:
      On Windows: %TEMP% directory
      On UNIX: $PS_HOME/log/dbname

     To specify a different PeopleTools Trace File:
     a) From the Trace tab in Configuration Manager, click the button on the right side of the PeopleTools Trace
          File edit box; a standard Open dialog appears.
     b) Navigate to and select the new trace file.
     c) Click Open.
          The field will now display the path and filename.
3.   Log completely out of PeopleTools and then launch PeopleSoft.
     When you change the settings and options in the Configuration Manager, the new settings will only take effect
     the next time you launch PeopleTools.

By following those simple steps, a PeopleTools Trace File will be created for your review in either the default
directory or the directory you specified.



SETTING TRACE OPTIONS ONLINE FROM THE UTILITIES
MENU

TRACE UTILITIES
Typically, you will want to enable the PeopleSoft trace utilities using the Configuration Manager, which gives you
more tracing options and better control of the process. However, you may occasionally need to turn these utilities on
or off while online—something you can't do using Configuration Manager—and that's where these Utilities pages
come in handy. Please note that the Utilities Page only works for 2-tier windows client, which no longer exists in
PeopleTools 8.4. It is not applicable to PIA or 3-tier windows client.




                                            Page 7
PEOPLECODE TRACE UTILITY
You use this page to change your PeopleCode tracing options while online. Your Configuration Manager settings
will not be affected. You can navigate to the panel from PeopleTools by selecting Utilities, Use, and Trace
PeopleCode.
You use Trace PeopleCode to create a file that displays information about PeopleCode programs processed from the
time you start the trace.




HOW ENABLE/DISABLE A PEOPLECODE TRACE ONLINE
Now that you are on the PeopleCode Trace Utility Page, enabling and disabling Trace is easy. Simply follow the
steps below to create a trace file.

1.   Select your trace options.
     Using your cursor, select/deselect the desired options.
2.   Save the Page.

If you selected any of the checkboxes, the system will start writing to the trace file.
By following those simple steps, a PeopleTools Trace File will be created for your review.

OTHER NOTES REGARDING PEOPLECODE TRACE
The checkboxes on this page correspond to the options on the Trace tab in Configuration Manager. However, the
selections that appear on this page do not necessarily reflect those made in Configuration Manager. While the
Configuration Manager settings are stored in the Windows registry and used each signon, the settings in the Utilities
page only apply to the current online session, and, once set, they override the Configuration Manager's settings.
The benefit of using this page to control PeopleCode tracing is that you can turn it on and off without having to
restart PeopleTools, and without resetting your Configuration Manager settings. One thing to keep in mind, though,
your selections are not enabled until you save the page.




                                            Page 8
Please note that the Trace PeopleCode utility has largely been made obsolete by the introduction of the PeopleCode
debugger. For reasons of upgrade compatibility, Trace PeopleCode has been left in place.


TRACE SQL UTILITY
You use this page to change your SQL tracing options while online. Your Configuration Manager settings will not
be affected. You can navigate to the panel from PeopleTools by selecting Utilities, Use, Trace SQL.




HOW TO ENABLE/DISABLE A SQL TRACE

Now that you are on the PeopleCode Trace Utility Page, starting a Trace is easy. Simply follow the steps below to
create a trace file.

3.   Select your trace options.
     Using your cursor, select/deselect the desired options.
4.   Save the Page.

If you selected any of the checkboxes, the system will start writing to the trace file.
By following those simple steps, a PeopleTools Trace File will be created for your review.


OTHER NOTES REGARDING SQL TRACE
The checkboxes on the Trace SQL page correspond to options on the Trace tab in the Configuration Manager.
However, the selections showing in this page do not necessarily reflect those made in the Configuration Manager.
The displayed page selections are not enabled until you save the page.




                                            Page 9
APPLICATION ENGINE TRACE (AET)

AET FROM A DOS COMMAND LINE

To specify traces on the command line, you enter the sum of the desired trace options. This is similar to
adding the trace values using PSADMIN, such as the COBOL statement timings or the SQL statement
trace value. To specify a combination of the traces, just enter the sum of the corresponding trace values.
For example, if you wanted to enable the step (1), the SQL (2), and the statement timings (128) traces,
you would enter 131—the sum of 1, 2, and 128.

When doing AET tracing try not to trace more than you need to, as these files can get quite large and hard
to read. Setting –TRACE 135 is a good setting as it gives you the steps, SQL, temp tables and timing
information. Setting –TOOLSTRACESQL 31 will trace the PSAE program and the output will go to the .trc
file. If you set –TOOLSTRACEPC 2048 it will trace all of the PeopleCode used in the program. You can
usually skip the –TOOLSTRACESQL because the issue is usually with the application SQL or
PeopleCode.

If you want to completely disable tracing, you must explicitly specify —TRACE 0. If you don't include the —
TRACE flag in the command line, PeopleSoft Application Engine uses the value specified in the Process
Scheduler configuration file or the Configuration Manager. Otherwise, the command line parameters
override any trace settings that may be set in the Configuration Manager.

To invoke an Application Engine program from the command line, you need to get to the directory where
the Application Engine executable (PSAE.EXE) lives (%PS_HOME%\BIN\CLIENT\WINX86 and then
specify the Application Engine executable (PSAE.EXE) followed by the required parameters, as shown in
the following example:

PSAE -CT <platform> -CD <database name> -CO <PSlogin> -CP <PSpswd> -R <run control id> -AI <program
name> -TRACE <integer>

Real Life Example: PSAE -CT ORACLE -CD HR83 -CO PS -CP PS -R RUNCNTL1 -AI UPG_HC70X01 -TRACE
135

-CT <platform> Required. Corresponds to the type of the database to which you are connecting. Valid values are
MICROSFT, ORACLE, SYBASE, INFORMIX, DB2UNIX, and DB2.

-CS <server> Required for Sybase, Informix. For those platforms that require a server name as part of signon,
enter the appropriate server name. This affects Sybase, Informix, and Microsoft SQL Server. However, for Microsoft
SQL Server, this option is valid but not required.

-CD <database name> Required. Enter the name of the database to which the program will connect.

-CO <oprid> Required. Enter the Operator ID that is running the program.

-CP <oprpswd> Required. Enter the password associated with the specified Operator ID/User ID.




                                         Page 10
-R <run control id> Required. Enter the Run Control ID to use for this run of the program.

-AI <program id> Required. Specify the Application Engine program to run.

-I <process instance> Required for Restart. Enter the Process Instance for the program run. The default is 0,
which means Application Engine uses the next available Process Instance.

-DEBUG <Y|N> This parameter controls the Debug utility. Enter Y to indicate that you want the program to run in
debugging mode, or enter N to indicate that you do not.

-DR <Y|N> This parameter controls Restart. Enter Y to disable Restart, or enter N to enable Restart. (DR represents
Disable Restart).

-TRACE <value> This parameter turns on the Application Engine trace. -DBFLAGS <value>

-TOOLSTRACESQL <value> Use this parameter to enable the SQL Trace.

-TOOLSTRACEPC <value> Use this parameter to enable the PeopleCode Trace.



TRACE VALUES AND WHAT THEY DO
The following is a list of the Trace values and what they do:

0                 Disables tracing.
1                 Initiates the Application Engine step trace.
2                 Initiates the Application Engine SQL trace.
4                 Initiates the trace for dedicated Temp Table Allocation to AET file.
128               Initiates the statement timings trace to file, which is similar to the COBOL timings trace to
                  file.
256               Initiates the PeopleCode Detail to the file for the Timings trace.
1024              Initiates 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              Requests 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.




                                          Page 11
RUNNING AET BY EDITING THE PROCESS DEFINTION
This is useful because you can turn on the trace settings for a single App Engine as opposed to turning on
trace settings globally on the application server level. This will enable you to only have tracing on for that
specific process. You can navigate to this by following the following breadcrumbs:

Home -> PeopleTools -> Process Scheduler Manager -> Use -> Process Definitions
Choose the Application Engine you would like to trace
Override Options Tab
In the parameter List select
Action: Append
Add the trace values you would like to enter
-TRACE <value>
-TOOLSTRACESQL <value>
-TOOLSTRACEPC <value>




                                        Page 12
ENABLING AET BY SETTING PARAMETERS IN SERVER
CONFIGURATION FILES
You can also enable traces in the configuration files for both the application server and the Process Scheduler server.

Application Server.
For programs invoked by PeopleCode and run on the Application Server, set the TraceAE parameter in the Trace
section to the desired value in the Application Server configuration file (PSAPPSRV.CFG). You can use PSADMIN
to set this parameter.

Values for config section - Trace
  TraceSql=0
  TraceSqlMask=12319
  TracePC=0
  TracePCMask=4095
  TracePPR=0
  TracePPRMask=4095
  TraceAE=<add trace value>

This option is available on Windows NT and UNIX.

Process Scheduler Server.
 In the PeopleSoft Process Scheduler configuration file, you can set the TraceAE parameter in the Trace section to
the desired level of tracing. You can use PSADMIN to set this parameter.

Values for config section - Trace
  TraceFile=%PS_SERVDIR%\logs\PeopleTools.trc
  TraceSQL=0
  TracePC=0
  TraceAE=<add trace value>

This option is available on Windows NT and UNIX, and applies only to Application Engine programs invoked in
batch mode.




                                           Page 13
LOCATING THE TRACE FILE
Where you look for the generated trace file depends on how you invoked the program and the operating system on
which the program runs, as follows:
Program started from:                   Where to look for Trace file

Windows workstation                     Look for the trace file in %TEMP%\PS\<db name>

PeopleCode                              Look for the trace file %TEMP%\PS\<db name> on NT and $PS_HOME/log/\<db
                                        name>

Command Line                            Look for the trace file in the directory specified in the Log/Output field in the
                                        PS_SERVER_CFG file

Process Scheduler                       Look for the trace file in a sub-directory of the directory specified in the Log/Output
                                        field in the PS_SERVER_CFG file

Without a Process Instance              Application Engine names the file according the following convention.
                                        AE_<Date/Time_Stamp>_<OS_PID>.AET
                                        Where the date/time stamp is <mmddhhmmss>

With a Process Instance                 Application Engine names the file according to the following convention.
                                        AE_<Program_name>_<Process_Instance>.AET

Note. For an Application Engine program running on a server, PeopleTools writes the generic
PeopleTools trace for SQL and PeopleCode trace files to the same directories as the AET traces. The
prefix of the trace file name is also the same, and the suffix is trc. On the Windows workstation, the trace
is written to the "People Tools Trace File" specified in the Trace folder of PeopleSoft Configuration
Manager.



TURNING ON TRACE FOR A PIA SESSION
If you want to give access to users to trace any page, PeopleCode, SQL w/o re-starting your application
server domain, then the easiest way is to tell users to sign on using trace settings. These trace settings
can be obtained two different ways. The first way is by editing the appropriate configuration.properties file
and find the setting enableTrace=false. If you change the value to true the user will have an additional
option on their PIA logon page, which says: To set trace flags, click here

Once they click on that they will see the screen below. You can also add &trace=y to your URL to get to
the same page. Some customers prefer this as it does not give all users the trace option automatically so
they don’t turn on tracing when not needed. This can cause a lot of overhead for the server. Here is an
example of what the URL should look like:

http://jpastori050102:7001/servlets/iclientservlet/hr83/?cmd=login&trace=y (just added &trace=y)




                                         Page 14
The trace files will be generated on Application Server box in logs directory for every user with a different
name.

As you can see in the example below you can trace both SQL and PeopleCode using this option. This can
be useful when you want to troubleshoot a particular navigation a user is having trouble with.




                                        Page 15
 APPLICATION SERVER TRACING OPTIONS
 LOGFENCE
 When configuring your domain you have an option to set the LogFence value this sets a desired level of network
 tracing ranging from -100 (suppressing) to 5 (all). The default is 3. The following list reveals the choices available
 for LogFence.

-100     -   Suppress logging
-1       -   Protocol, memory errors
0        -   Status information
1        -   General errors
2        -   Warnings
3        -   Tracing Level 1 (default)
4        -   Tracing Level 2
5        -   Tracing Level 3
 The Trace file will be generated in the following directory:
<PS_HOME>\appserv\<domain>\LOGS\psappsrv.log


 TRACE
 This section enables you to specify the tracing options that you can enable on the application server to track the SQL
 and PeopleCode of your domains.

Values for config section - Trace
    TraceSql=0
    TraceSqlMask=12319
    TracePC=0
    TracePCMask=4095
    TracePPR=0
    TracePPRMask=4095
    TraceAE=0
    TraceOpt=0
    TraceOptMask=4095
    Write crash dump to separate file=Y
Do you want to change any values (y/n)? [n]:


 TraceSQL
 Sets the logging level for SQL tracing for all clients. Traces are written to the following location:
 <PS_HOME>/appserv/<domain>/LOGS/<Domain User ID>_<svrname>.tracesql. See TraceSQLMask for trace
 options.
 If you enter 0 it disables tracing; use 7 to enable a modest tracing level for debugging. For other levels of tracing, set
 to a value equal to the sum of the desired options. For example, if you want to trace only SQL, TraceSQL=1; if SQL
 statements and Connect statements are desired, TraceSQL should be set to 1+ 2 + 4 = 7. A setting of TraceSQL = 7
 is recommended for troubleshooting connection and other basic problems. Tracing can consume large amounts of
 disk space over time so be sure to reset TraceSQL = 0 when you finish troubleshooting. It is a good idea to set




                                             Page 16
 TraceSQL=31 for application server booting and user id logon problems. You can review the trace file to
 troubleshoot these types of issues. Also, set LogFence=5 if you are having trouble booting a domain, as this will log
 the most information to help you better troubleshoot.

 TraceSQLMask
 Sets the logging level ceiling for SQL tracing for individual clients. Traces are written to the following location:
 <PS_HOME>/appserv/<domain>/LOGS/<Client User ID>_<svrname>.tracesql. Clients must specify the desired
 SQL tracing level using PeopleSoft Configuration Manager on the Trace tab. To prevent clients from turning on the
 application server trace, and consuming resources, the application server uses TraceSQLMask as an administrative
 control facility.
 If a client transmits a request to trace SQL, the application server compares the value transmitted to TraceSQLMask.
 If the client value is less than or equal to TraceSQLMask, the application server enables the trace. However, if the
 client value is greater, application server will enable the trace up to the TraceSQLMask value. Trace files are written
 on the application server; no trace shows up on the client workstation.
 Trace values are set in the application server configuration file psappsrv.cfg file. Output files are written to directory
 $PS_HOME/appserver/winx86/<domain>/logs.
 For TraceSQL and TraceSQLMask you have the following options:

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        -   Mapcore information

 TracePC
 Sets a desired level for PeopleCode tracing for activity generated by all clients on a domain. Eligible values are
 defined in the configuration file. TracePC values are displayed in PeopleSoft Configuration Manager on the Trace
 tab. You can find the results in the following location: <PS_HOME>/appserv/<domain>/LOGS/<domain>.log.

 TracePCMask
 This parameter controls which of the PeopleCode Trace options requested by client machines will be written to the
 trace file. The results of this trace are written to
<PS_HOME>/appserv/<domain>/LOGS/<ClientMachine>.<domain>.log




                                             Page 17
 For TracePC and TracePCMask you have the following options.

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

 TracePPR and TracePPRMask
 You use these options to trace the activity in the page processor. Typically, these options are used internally only by
 PeopleSoft developers, however, you may need to view the results of this trace when troubleshooting. For the values
 of each trace, see the following list:

1           -   Log extra debug messages
2           -   Dump panel after build
4           -   Dump buffers after PPRInit
8           -   Dump buffers before/after service
16          -   Dump buffers after scrollselect
32          -   Dump buffers after modal panel
64          -   Dump buffers before save
128         -   Dump buffers after insertrow
256         -   Trace default processing
512         -   Dump PRM data
1024        -   Log HTML generation errors
2048        -   dump memory statistics
4096        -   Trace related display processing
8192        -   Trace keylist generation
16384       -   Trace work record settings


 TraceOpt and TraceOptMask
 The bits enable logging for Optimization Engine components beyond the standard LogFence setting. For example,
 TraceOpt=3510 sets full trace on all components. The following list shows the options for tracing the Optimization
 Engine components.

1           -   OptEngine   LSB
2           -   OptEngine                   MSB LSB         LogFence
4           -   OptEngine   MSB             --- ---     --------------------
8           -   Utilities   LSB              0 0 0      0 (Severity_Status)
16          -   Utilities                    0 0 1      1 (Severity_Error)
32          -   Utilities   MSB              0 1 0      2 (Severity_Warn)




                                            Page 18
64         -   DataCache LSB                   0   1   1   3    (Severity_Info)
128        -   DataCache                       1   0   0   4    (Severity_Trace1)
256        -   DataCache MSB                   1   0   1   5    (Severity_Trace2)
512        -   Plug-in LSB                     1   1   0   6    (not used)
1024       -   Plug-in                         1   1   1   7    (not used)
2048       -   Plug-in MSB



 TRACING FROM THE PROCESS SCHEDULER
 LOGGING LEVELS
 The logging system enables you to change the level of detail written to the log files. The mechanism chosen here
 uses the concept of a detail level and a "fence." Messages are assigned a numeric detail-level value that reflects the
 importance of the event that triggers the message in the operation of the program. This ranges from simple progress
 messages (very detailed) to error messages when the program is about to abort (not detailed).
 The fence is used to filter out messages that reflect more detail than necessary in a particular installation. For
 example, a message must be able to leap the fence to be shown (with a lower number indicating a higher fence).
 With the fence set to 2, only messages with a detail level less than 2 (that is, 0 or 1) appear. The only exception to
 this is that level 0 messages, and messages unable to be displayed in the standard message format, cannot be filtered
 out.
 The meaning of a level is completely arbitrary, although a consistent convention should be followed. The server uses
 the following convention:


 Fence Level                  Description

 0                            Errors, critical messages, and connection header only.

 1                            Critical events. For PeopleSoft Process Scheduler, this includes process start attempts.

 2                            Warnings.

 3                            Informational. This is the default fence value.

 4                            Trace level 1 detail.

 5                            Trace level 2 detail. This shows all messages that are available.


 The fence is determined by an entry in the server configuration file in the [Process Scheduler] section named
 LOGFENCE. Normal values are in the range of 0—5 with the default being 3 (informational). A setting of 5 is
 recommended for installation and troubleshooting. A setting of 0 is good for an installed system that is working
 smoothly.
 The log fence of a message can be seen in the PeopleSoft Process Scheduler log file.




                                              Page 19
 SQL TRACE FILE
 The SQL trace file is created when the TraceSQL variable in the PeopleSoft Process Scheduler configuration file has
 a value other than zero. This file contains the SQL traces issued by the Distribution Agent program PSDSTSRV.
 Use the TraceSQL variable to set the level of SQL trace by selecting the numerical value representing each degree of
 tracing as described. The list of trace levels from which you can choose appears in the configuration file as shown:
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 that 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=Mapcore information
 If you want SQL Statements; SQL statement variables; and SQL connect, disconnect, commit, and rollback
 information; specify TraceSql=7 (1+ 2 + 4).
 Note. The SQL trace file doesn't delete existing traces that are written from prior runs of the PSPRCSRV
 program, and it appends new SQL activity to the end of the file. Because the file can grow quite large and
 might fill up your file server, it's recommended that you reset the TraceSQL to zero after you complete
 debugging the PeopleSoft Process Scheduler Server Agent.


 LOG AND SQL TRACE FILE NAMES IN WINDOWS NT/2000 AND UNIX
 Server Name         Description                     Log File                      SQL Trace File

 PSPRCSRV            PeopleSoft Process Scheduler    SCHDLR_<mmdd>.LOG             <User ID>_PSPRCSRV.tracesql
                     Server

 PSDSTSRV            Distribution Agent              DSTAGNT_<mmdd>.LOG            <User ID>_PSDSTSRV.tracesql

 PSAESRV             PeopleSoft Application Engine   APPSRV_<mmdd>.LOG             <User ID>_PSAESRV.tracesql
                     Server

 PSAEOSRV            PeopleSoft Application Engine   APPSRV_<mmdd>.LOG             <User_ID>_PSAEOSRV.tracesql
                     Server to run Optimization
                     Engine

 PSOPTENG            Optimization Engine Server      OPTENGS<server                <User_ID>_PSOPTENG<server
                                                     number>.LOG                   number>.tracesql

 PSMSTPRCS           Master Scheduler Server         MSTRSCHDLR_<mmdd>.LOG         <User ID>_PSMSTPRC.tracesql




                                            Page 20
 DISTRIBUTION AGENT LOGGING SYSTEM
 The Distribution Agent detects that there are files ready to transfer by querying the Report List table
 (PS_CDM_LIST).

 Transfer Log for FTP and XCOPY
 When the Distribution Agent transfers files using the FTP or XCOPY protocol, it tables the information for all of the
 process requests and assigns a transfer log to this transfer attempt. Any activity from transferring the files for these
 process requests is recorded in a log file with the following format:

<Log Directory>\_PSDSTSRVLOG\transfer_<Transfer Instance Number>.log


 Transfer Log for HTTP
 When HTTP is used to transfer files to the Report Repository, it doesn't generate a transfer log like FTP and
 XCOPY. All logs relating to the HTTP activities are logged in the Process Message Log table and can be viewed by
 clicking the Message Log link on the Process Monitor Detail page in PeopleSoft Process Scheduler.




                        Example of HTTP messages displayed on the Message Log page



 PEOPLECODE DEBUGGER FOR PIA
 SUMMARY

 With PeopleTools 8, PeopleCode has been enhanced to provide web-enabled commands, thus a special environment
 is required to debug the code. When developing applications for the PeopleSoft Internet Architecture (PIA),
 developers must debug in the same environment in which end users will access the application. This requires that an
 application server be configured and running on the developer’s local machine, and that the PeopleSoft Debug
 Broker Class (DbgBrkr Class) is configured for three-tier/PIA debugging. The PeopleSoft software (PeopleTools
 only) must also be installed on the local machine, and not on a network drive.

 The PeopleCode debugger is now part of Application Designer, so it must always run from there. Any PeopleCode
 can be debugged. The only restrictions on setting up the debugger is:




                                             Page 21
         1.   The application server must be using NT/2000 and reside on the same machine as PSIDE.EXE (in the
              PeopleTools bin directory).
         2.   PeopleSoft software must be installed locally on the application server machine -- no network mapping.
         3.   Application Designer must be connected in 3-tier.
         4.   A minimum of 2 PSAPPSRV processes must be started for your domain.
         5.   Service Timeout for the PSAPPSRV processes should be set to 0.
         6.   the PSDBGSRV port number must = 9500. In PeopleBooks it says that this port has to be unique, this
              is not true it must be set to 9500.
         7.   You should logon to PIA with the same user id that you logged to Application Designer with.


INSTALLING THE PEOPLETOOLS ENVIRONMENT

The PeopleCode debugger requires that the user/developer have a local copy of PeopleTools on their workstation.
There are two methods for installing the PeopleTools environment locally.

One method is to install directly from the PeopleSoft media – the CDs delivered by PeopleSoft. The advantage of
this method is that it’s pretty quick, and not much can go wrong. It requires that the user have the PeopleSoft license
code for PeopleTools. Only the PeopleTools CD is required. Installation from CD is covered in the Install Guide,
Chapter 2.

The alternative is to install a batch environment from an existing PeopleSoft file server. This is accomplished by
using the PeopleSoft-supplied transfer program, PSTRANS. Details for running PSTRANS can be found in the
Install Guide, Chapter 4A, Task 4A-4. It’s a straightforward process that requires that the user run
<%PS_HOME%>\BIN\CLIENT\WINX86\PSTRANS.EXE, and supply the requested install information (paths,
etc.). A disadvantage of this method is that it copies a lot more stuff than is required to setup the debugger. It may
also take more time, and will be a network hog for the duration. The primary advantage of this method is
convenience – users already have access to the file server, and no license code is required.


SETTING UP THE DEBUG BROKER CLASS AND DEBUG USER ACCOUNT

The Debug Broker Class in Windows requires a local NT userid to execute it.
This procedure involves the following tasks:

        Creating a user account for the Debug Broker process.
        Cleaning up previous COM registrations using Configuration Manager.
        Registering the COM components by launching Application Designer with a two-tier connection.
        Configuring the Distributed COM Configuration Properties for the Debug Broker class.

Note: To access the Application Designer in two-tier mode, the following instructions do not apply.

To set up the PIA/three-tier debugging environment:

    1.   Create a local User ID for the Debug Broker process to use.

         On NT:




                                            Page 22
a)   Start Programs Administrative Tools (Common)  User Manager.
b) Select User, New User.
c)   Fill out the information for the new user.

                      Enter PSDBGBRKR, or something, for Username.
                      Enter PSFT - Debug Broker for Full Name.
                      Leave the Password and Confirm Password fields blank.
                      Deselect User Must Change Password at Next Logon.
                      Select Password Never Expires.
                      Click OK, and exit User Manager.

          On Windows 2000:

a)   Go to Start Settings Control Panel
b) Select Users and Passwords, choose the Advanced tab, and then click on the Advanced button.
c)   Right-click on the Users folder, then select New User.
d) Fill out the information for the new user.

                      Enter PSDBGBRKR, or something, for Username.
                      Enter PSFT - Debug Broker for Full Name.
                      Leave the Password and Confirm Password fields blank.
                      Deselect User Must Change Password at Next Logon.
                      Select Password Never Expires.
                      Click OK, and exit User Manager.


     2.   Clean up the Distributed COM registration for the Debug Broker. This step should be performed any time
          the PeopleTools version changes.


             Option 1 - Via command line:
              a)   Start  Run  <PS_HOME>\BIN\CLIENT\WINX86\PSDBGCLN.EXE noprompt
              b) This will clean up/delete all entries in the registry related to the debug broker


             Option 2 - Via Configuration Manager:

              a)   Open the PeopleSoft Configuration Manager.
              b) Select the Client Setup tab.




                                            Page 23
         c)   Click Unregister Com Components.
         d) Click OK to close the Configuration Manager.


3.   Sign on to PeopleTools with a two-tier connection and open Application Designer and then sign off. This
     registers the COM services for the debug broker.
4.   Configure the Distributed COM properties.

        Start Run, and type in DCOMCNFG. It’s probably in your system path – it is a Windows program
         that resides in the SYSTEM32 directory.

        On the Distributed COM Configuration Properties dialogue, select the Applications tab, find and
         highlight DbgBrkr Class, and click on Properties.




        On the DbgBrkr Class Properties dialog, select the Identity tab, click This user and click Browse.
        From the List Names From dropdown list, select your local machine name.
        Select user PSDBGBRKR, click Add, and then click OK. This returns you to the DbgBrkr Class
         Properties, Identity tab.




                                      Page 24
            Click Apply and/or OK.

The Debug Broker is now set up for three-tier debugging.



SETTING UP THE APPLICATION SERVER FOR DEBUGGING

To set up the application server for PeopleCode debugging, note the following requirements for the application
server:
     The application server must be running on the same computer as PeopleTools and the debugger. While
         Application Designer and the application server must be on the same computer, you can run the browser
         either from a different computer or the same computer.
       The application server domain requires at least two PSAPPSRV server processes.
       The application server must have Enable Debugging turned on in PSADMIN (value > 0).
       Set all Service Timeout parameters to 0 (unlimited) to avoid timing out a debug session.


Domain Settings and Configuration Templates




                                         Page 25
In order for the debugger to work, it has to run in parallel with the application it's debugging. This requires that the
application server be able to process multiple components simultaneously. To achieve that, there must be at least
two PSAPPSRV server processes running. One PSAPPSRV handles the debugger program while the other handles
the application being stepped through with the debugger, providing the interactive debugging capability.

The PeopleSoft-delivered configuration templates have at least two PSAPPSRV processes. If using a custom
template, configure the domain to start two PSAPPSRV processes, prior to debugging. In psappsrv.cfg, set the Min
Instances parameter in the PSAPPSRV section to 2.

         For example: Min Instances=2

It is also important to set the Service Timeout parameter for PSAPPSRV to zero.

         For example: Service Timeout=0

Disabling service timeouts prevents the application server processes from timing out if the user stops at a particular
point in the program while debugging.

Note: PeopleSoft recommends using the Developer configuration template because this template, by default,
provides two PSAPPSRV server processes, has Enable Debugging activated, and has Service Timeout(s) set to
zero.

To debug your PeopleCode on the application server you need to enable debugging in the application server
configuration. The parameter that controls debugging for PeopleTools 8.1x is called Enable Debugging, and it’s
found in the Domain Settings section of PSADMIN. To put the domain in debugging mode, set Enable
Debugging=1. Set it to 0 to disable debugging mode.

For PeopleTools 8.4x you will be prompted to start the PeopleCode debugger with the following question.
Do you want to enable PeopleCode Debugging (PSDBGSRV) (y/n?) [n:]
Reply ‘y’ to start the debugger or ‘n’ to disable.

Assure that the Min Instances parameter is set to two for PSAPPSRV, and that the Service Timeouts are set to zero.
When not debugging, the Enable Debugging should be turned off (set to 0), or the application server domain shut
down. The debugging mode brings an unavoidable amount of overhead, and system performance is affected while
debugging is in progress.

CONFIGURING THE WEB SERVER

The web server must be configured to route web traffic through the debugging application server. This requires that
PIA be configured for that app server. Reference the Install Guide, Chapter 8A, Tasks 8A-1 and 8A-3 for the steps
to create and configure the PIA environment.

The web server can reside on the debugging machine, or on another box. Physical location isn’t relevant to the
debugging process.




                                            Page 26
CONFIGURING THE WORKSTATION

The key to running the PeopleCode debugger, is to have the application server and PSIDE.EXE running on the same
machine. PSIDE is the developer’s equivalent of PSTOOLS, and provides the environment for running Application
Designer. Any existing PeopleSoft icons that are configured to access the file server, cannot be used. A separate
icon must be created to point to the local copy of PSIDE. That’s it. The workstation/user environment requires no
additional setup for debugging.

During login, the Connection Type must specify Application Server. It might be desirable to add the local
application server to the drop down list on the login screen, which can be done using Configuration Manager. If this
is not done, the Application Server Name field must be entered in the form <machine_name>:<port #> (e.g.,
JRW2K01:9000, or localhost:9000) at login.


TESTING THE PEOPLECODE DEBUGGING ENVIRONMENT

Here are some simplified debug steps, in order to perform a quick test of the configuration. Check out the
PeopleBooks, PeopleCode Developer’s Guide, for a thorough discussion of debugging.

1.   Make sure the app server domain is started.
2.   Bring up a 3-tier session for the Application Designer, making sure to specify the local app server domain.


        Open up a project or object which contains the PeopleCode to be debugged.

        Start the debugger: Debug  PeopleCode Debug Mode in 8.1x

        For PeopleTools 8.4x: Debug  Enter Debug Mode

        Select the type of breakpoint desired, and set the breakpoint in the code.

3.   Bring up an Internet browser session.

        Use the URL that routes through the application server that has been setup for debugging.

        Sign on to the database.

        Select the menu and enter the necessary data to get to the panel with the PeopleCode.

        A 3-tier Application Designer window will appear when the breakpoint is reached.
        Step through the PeopleCode using normal debugger commands and keys.




                                             Page 27

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:28
posted:10/25/2011
language:English
pages:27