I had an issue recently where I needed to trace a process to try to determine where a bug was occurring. So, I decided to try to document how I could setup tracing on a single process.
To enable tracing, you need to open the process definition. Online, navigate to PeopleTools > Process Scheduler > Processes. Then, search for the process that you want to trace. Make sure that you change the search page so that you are searching by process name and not the process type. Once you have the Process Definition open, go to the Override Options tab. Then, change the parameter list to “Append” and enter the desired trace settings.
This is the recommended setting by Ketan on PeopleSoft Support & Tips:
-TRACE 135 -TOOLSTRACESQL 31 -TOOLSTRACEPC 1984
I think I would prefer these settings instead:
-TRACE 7 -TOOLSTRACESQL 3 -TOOLSTRACEPC 3596
My options aren’t to say that Ketan’s are wrong. I just cut out some of the options I wouldn’t use to trim the extra info in the log file. I also normally use traces for troubleshooting, so my options are tuned for that.
You can read below for details on what each of these does.
The -TRACE option sets the tracing for the App Engine program generally speaking. For example, it can turn on the trace output that displays which steps run in which order. Here are the different options (from the psappsrv.cfg file):
- 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
- 2048 = DB optimizer trace to file
- 4096 = DB optimizer trace to tables
If you’ll notice, 135 is “Timings Report to AET file”, “Trace Dedicated Temp Table Allocation to AET file”, “Trace Application SQL statements to AET file”, and “Trace STEP execution sequence to AET file”. My preference just leaves off the Timings Report. I think the timings report would be good for performance tuning, but if you are troubleshooting, it is just overhead.
The -TOOLSTRACESQL option specifics the SQL tracing besides the SQL executed by steps in an App Engine program. This would include any PeopleTools system database communication, and more importantly, it would include any database access caused by a component interface driving an online screen.
Here are the 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
- 1024 = SQL Informational Trace
Again, the recommended setting is 31, which includes: “All other API calls except ssb”, “Row Fetch (indicates that it occurred, not data)”, “SQL connect, disconnect, commit and rollback”, “SQL connect, disconnect, commit and rollback”, “SQL statement variables”, and “SQL statements”. My choice would just be to see the SQL statements and the variables because that is the most important information. Commits and Rollbacks can be important, but you generally know when those happen and don’t need the extra information. The fetches will tell you how many rows you will receive but it won’t give you any of the data, so it just clutters the trace file. Those options can be helpful, but unless you need them, I would leave them off.
Finally, the -TOOLSTRACEPC option turns on tracing for PeopleCode. This could be PeopleCode steps in an App Engine, or it could be PeopleCode in a component accessed by a Component Interface. Here are the options:
- 1 = Trace Evaluator instructions (not recommended)
- 2 = List Evaluator program (not recommended)
- 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 (recommended)
The recommended option is 1984, which includes: “Show function return value”, “Show parameter values”, “Trace internal function calls”, “Trace external function calls”, and “Trace start of programs”. For me, I want to see what PeopleCode is running, so the most important option would be 2048 — Tracing each statement. The variable assignments, fetched values, parameter values, and function returns all show the data as it flows through the PeopleCode, so I find those helpful in troubleshooting. For me, that adds up to: 3596.
- PeopleSoft Support & Tips: Configuration Settings for Tracing
- PeopleSoft Wiki: Tracing and Debugging