Showing posts with label Developer Traces. Show all posts
Showing posts with label Developer Traces. Show all posts

Developer Traces

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.

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.

Recommendation Recommendation

You can use trace logging to track down sporadic errors.

End of the recommendation.
File Names of Developer Traces

The names of the trace files are as follows:

File Names for Developer Traces

Component

File name

Dispatcher

dev_disp

Work process /task handler

dev_w, whereby n is the number of the work process.

Gateway

dev_rd

Message server

dev_ms

Internet Communication Manager (ICM)

dev_icm

SAP Web Dispatcher

dev_wdisp

RFC (Remote Function Call) facility

dev_rfc, dev_rfc

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

dev_rfc traces RFC calls executed in SAP work processes. is the number of the work process in the server (as shown above). A work process uses the same log file across RFC calls.

Internet Communication Framework (ICF)

dev_icf

More information: Managing Error Information

Enqueue (lock)

When a classical central instance is running with enqueue work process dev_w, where w is the enqueue work process.

When a standalone enqueue server is used in an ASCS instance with the message server there are several trace files that all start with dev_enq.

More information: Trace Files of the Standalone Enqueue Server and Replication Server

Startup Service(sapstart)

dev_sapstart

Transport programs R3trans and tp

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.

The information traced is determined by the trace level - this applies to all trace files (see below).

Error and System Log Entries in Trace Files

Each line in the trace files starts with the component abbreviation. This is the letter that identifies the trace component. The assignment can be found under Trace Components:

In accordance to these letters, lines that contain error information begin with *** ERROR=>. Lines for which system log entries are written start with *** LOG .

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

Working with Developer Traces

The following sections explain how to use developer traces.

  • Activating and Deactivating Developer Traces

    To find out how to activate and deactivate developer traces see Activating and Deactivating Developer Traces.

  • Displaying Developer Traces

    To find out how to display developer traces see Displaying Trace Files.

  • Downloading Developer Traces

    To find out how you can easily and quickly downlad trace files on to your computer see Downloading Trace Files.

Downloading Trace Files

Use

If you want to save trace files locally as text files, you can download them using the ABAP report RSMON000_DOWNLOAD_TRACES.

This is especially useful when handling large trace files and quicker than saving them locally from the system.

You can also download several trace files at a time, and also compress them.

Procedure

To do this use the ABAP report RSMON000_DOWNLOAD_TRACES. You can also use the ABAP Editor (transaction SE38) or the Object Navigator (SE80).

You have the following options:

Select Trace Files

You can download trace files from the following components:

· Dispatcher (dev_disp)

· Work processes (dev_w*)

· Message server (dev_ms)

· Gateway (dev_rd)

· Internet Communication Manager (dev_icm)

With the work processes you can specify the work process types which you want to download the trace files for.

· Dialog (DIA)

· Update (UPD)

· Enqueue (ENQ)

· Background (BTC)

· V2 Update (UP2)

· Spool (SPO)


All the trace files belonging to the work processes of the type that you selected are downloaded. So for example, if 10 dialog work processes are configured, but you only want one of the trace files, you can display the trace file in the Process Overview (SM50), and download it by choosing List ® Save ® Local File.

Save Old Trace Files Too

Each time the system is restarted, and before new trace files are written, the old trace files are saved and the extension “.old” added to their names.

You can decide whether you want to also download these old trace files.

Type of Save

You can make the following settings:

· Compress Files If you select this option, the trace files are compressed before they are saved on your local computer. Then they are saved in a SAR file, which you can unpack again with SAPCAR.

· Save Without Querying File NamesThis option stops the system from asking you if you want to save the file under this name. Any files with the same name that may exist are overwritten.

· Local Directory Here you chose the directory the file(s) is to be stored in. If you do not specify a directory, the local standard directory is used (this depends on the operating system and the configuration).

Leaving content frame

Displaying Trace Files

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

Within the SAP System:

Choose transaction ST11. Here, you see all the trace files in the work directory. Double-click on a file to display there. If you want to save a file locally, choose System ® List ® Save ® Local file.

The following trace types have their own transactions.

Component

Transaction

More Information

Work process

SM50

Displaying and Controlling Work Processessapurl_link_0004_0003_0007

Gateway

SMGW

Using SAP Gateway in SAP Systemsapurl_link_0006_0002_0005

Message server

SMMS

Message Server Monitorsapurl_link_0001_0002_0007

ICM

SMICM

Monitoring the ICM with the ICM Monitorsapurl_link_0007_0005_0008

SAP Web Dispatcher

-

SAP Web Dispatchersapurl_link_0007_0006_0008

You can also download the trace files onto your local computer. To do this use the ABAP report RSMON000_DOWNLOAD_TRACES. For more information see Downloading Trace Files.

From the operating system:

...

1. 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.

2. Change to the workdirectory of the SAP application server.

Typical menu path (UNIX; other systems similar): /usr/sap///work

or /usr/sap/CLP/D01/work

3. Display the list of files in the directory. (The names of the files are listed below.) Use an operating system command like more to display the files.

Recommendation

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, profiles, 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.trcfiles.

Leaving content frame

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 SM50).

2. Choose the work process(es) in which you wish to increase the trace level.

3. Choose Process ® Trace ® Active components.

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.

4. 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 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= 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 and Deactivating Developer Traces from the Command Line:

You can also manage the tracing using 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 see the documentation on the Computing Center Management System Guide (CCMS).

The following criteria are available:

· TRACE=0: No trace

· TRACE=1: Write error messages in the trace file.

· TRACE=2: Full trace. The trace entries that are actually written can vary with the ABAP program that is being traced.

· TRACE=3: Additionally, trace data blocks.

Next Steps

You can then view the traces in the system or at operating system level, or download them to your local computer. The sections below contain more details:

Display Trace Files

Download Trace Files

Leaving content frame

Developer Traces

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 workdirectory of the SAP application server that generated the trace.

You can use trace logging to track down sporadic errors.

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, whereby n is the number of the work process

Gateway

dev_rd

Message server

dev_ms

Internet Communication Manager (ICM)

dev_icm

SAP Web Dispatcher

dev_wdisp

RFC (Remote Function Call) facility

dev_rfc, dev_rfc

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

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

FastRFC

dev_lcom

Enqueue (lock)

dev_eq

Standalone enqueue server: dev_enqrepl, dev_enqsig, dev_enqsrv, dev_enqwork, dev_enqio_

Startup (sapstart)

dev_sapstart

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.


The information traced is determined by the trace level - this applies to all trace files (see below).

Error and System Log Entries in Trace Files

Each line in the trace files starts with the component abbreviation. This is the letter that identifies the trace component. The table below shows the component abbreviations:

Component Abbreviation in Trace File

Component (Selection using SM50 or SM04)

M

Task handler

A

ABAP processor

Y

Screen processor

X

Extended memory

E

Lock management (enqueue)

I

IPC (inter process communication)

S

Print (spool)

N

Security

T

Debug system

L

Background

B

Database

C

Database (DBSL)

P

Paging

R

Rolling

D

Diag processor

In accordance to these letters lines that contain error information begin with *** ERROR =>. Lines for which system log entries are written start with *** LOG .

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.

Integration

The following sections explain how to use developer traces.

Turning Developer Traces On and Off

To find out how to activate and deactivate developer traces see Activating and Deactivating Developer Traces.

Displaying Developer Traces

To find out how to display developer traces see Displaying Trace Files.

Downloading Developer Traces

To find out how you can easily and quickly downlad trace files on to your computer see Downloading Trace Files.

More Information

Further trace functions include:

Trace logging

System trace

Leaving content frame