Developer Trace 

Definition

Developer traces contain technical information for use in the event of problems with your System. Using the entries in the developer traces requires a sophisticated knowledge of the host systems in which your SAP System is running and of the SAP System itself.

Use

The traces can be useful in diagnosing host system and SAP-internal problems that are affecting your SAP System.

Developer traces are written in files in the work directory of the SAP application server that generated the trace.

Structure

File Names of Developer Traces

The names of the trace files are as follows:

Developer Trace File Names

Component

File Name

Dispatcher

dev_disp

Work Process

 

Task handler

dev_w<n> n is the range from 0 to one less the number of work processes.

Dynp (screen processor)

dev_dy<n>

Roll

dev_ro<n>

Paging

dev_pg<n>

DB interface

dev_db<n>

ABAP processor

dev_ab<n>

Enqueue (lock)

dev_eq<n>

Logging

dev_lg<n>

Spool

dev_w

Message server

dev_ms<n>

SAPGUI (presentation)

dev_st<logon name>

APPC-server (CPIC gateway)

dev_appc

RFC (Remote Function Call) facility

dev_rfc, dev_rfc<n>

dev_rfc traces RFC calls to external functions (written in C or Visual Basic).

dev_rfc<n> traces RFC calls that are executed in R/3 work processes. <n> is the number of the work process in the server (as shown above). A work process uses the same log file across RFC calls.

Gateway

dev_rd

R3trans and tp transport programs

dev_tp

Monitoring infrastructure (test mode only)

dev_moni

In normal operation, you will not see this file. It is used only by test tools of the monitoring infrastructure. It therefore appears only if the test tools must be activated during a support session.

 

Error and System Log Entries in Trace Files

In the files, lines that contain error information begin with *** ERROR =>. Lines for which system log entries are written start with *** LOG <message ID>.

An "error line" contains the name of the calling function, the operation that failed, the error number from the host system (if a system call is involved), and the name of and line in the C module that failed.

Turning Developer Traces On and Off

You can turn developer traces on and off and set the trace level dynamically from within the SAP System or with system profile parameters or command-line arguments.

Activating / Deactivating Developer Traces from within SAP System:

  1. Choose Administration ® System management ® Monitor ® System monitoring ® Process overview. Alternatively, enter transaction code SM50.
  2. Choose the work process in which you wish to increase the trace level. To trace all work processes of a server, use the system profile method shown below.
  3. Choose Process ® Trace ® Active components.
  4. The system presents a dialog screen that shows the current status of the developer trace.

Turn developer tracing on and off for different server components by selecting the appropriate checkboxes.

Set the degree of detail by entering a number in the Level field. Possible trace levels are as follows:

0: No trace.

– 1: Write error messages in the trace file.

– 2: Full trace. The trace entries that are actually written can vary with the SAP program that is being traced.

– 3: Additionally, trace data blocks.

Activating / Deactivating Developer Traces from the System Profile:

You can also set trace options instance-wide with the rdisp/TRACE=<n> option. The trace values are the same as those in the list above.

Setting the trace parameter in the instance profile of a particular server activates developer traces only in that server.

Setting the parameter in the default profile would activate traces in all servers (excepting those whose instance profiles specify a different parameter value).

Activating / Deactivating Developer Traces from the Command Line:

You can also turn tracing on, or set the various trace levels by entering the appropriate commands in the command line. This is possible in all SAP programs. Typically, you must add these options to the start commands for SAP processes in the start-up profile of an instance of your SAP System. For information on editing start profiles, see the profile maintenance documentation in the Computing Center Management System Guide.

The following criteria are available:

Displaying Developer Traces

You can display developer traces from within the SAP System and from the operating system level.

Within the SAP System:

  1. Choose Administration ® System management ® Monitor ® Server. Alternatively, enter transaction code SM51.
  2. Select the server whose developer traces you want to display. Then choose Goto ® Traces.
  3. The system presents the list of developer traces available at the server. (The names of the files are listed below.)

  4. Choose Attributes to display summary information on the trace, including the user who created it and the time stamp.

Choose Display to display its contents.

You can also display work process traces from the Process overview function (transaction SM50) in the same menu path.

From the operating system:

  1. Log on to the correct host system.
  2. You need to access the work directory of the SAP application server whose traces you wish to see. This directory is always local, located on the host on which an SAP application server is running. You’ll therefore need to log on to the host system of the SAP application server.

  3. Change to the work directory of the SAP application server.
  4. Typical menu path (UNIX; other systems similar): /usr/sap/<SYSTEM ID>/<INSTANCE>/work

    or /usr/sap/CLP/D01/work

  5. Display the list of files in the directory. (The names of the files are listed below.) Use a host system command like more to display the files.

Always display trace files from within the SAP System if you can. The files are presented in the SAP System in an easier-to-read format than they are at the operating system level.

Core files, profile and start traces: Should one of the work processes of an application server terminate abnormally with core dump, you will also find the core files in the work directory.

Further, you can display the start-up and instance profiles used by an SAP application server along with the developer traces. Server start-ups are recorded in the sapstart<n>.trc files.