You can use the administration of the system trace to:
· Set the Profile Parameters for the system trace
· Monitor the internal status
· Write trace data to file
· Display the trace files
To use the SAP trace administration you need to have a basic understanding of the system architecture and of how work process errors are logged.
To get to the system trace administration choose icon Administration from the initial screen (ST01).
In the top group box on the screen you can see all the settings relevant for the trace (see Profile Parameters).
· Maximum file size
· Current number of trace files
· Maximum number of trace files
· Stack depth
· Maximum lock duration
· Buffer size
· Copy trace
When you choose the button Change the name of the current TRACE file is changed and a new file started, even if the first file has not reached the maximum size (see below: Trace File List). This is useful if the current file is corrupt and cannot be read.
With the exception of the current number of trace files, the name of the relevant profile parameter is given in brackets. All the parameters users can change dynamically are in fields that you can enter data in. Choose Activate to make changes effective in the system. To display parameter documentation place the cursor on a parameter name and choose Parameter Help (like in transaction RZ11).
When the profile parameter "stack depth" and "buffer size" are activated, new memory must be allocated (especially for the buffer size), which can fail at runtime. As this has to be done separately in each work process, it may happen that in some work processes the activation works, and in others it doesn’t. In case of an error occurring, the process writes an error trace to the trace file.
It could happen that the internal buffer size does not correspond to the changed value of the profile parameter (the one in the shared memory).
The button Reset sets the field values to the current parameter value active in the system.
This does not have to be the value that the parameter had when the system was started up.
When tracing is active, several processes need to access central resources. These resources include the file index (see below) and the current trace file TRACE. Only one process can access each of these resources at any one time. This is regulated by a central mutex. The status of this mutex is displayed in the left-hand area of the screen under Mutex Status. Free means that the mutex is not occupied by a process and that currently no process is accessing the specified resources. This is of course only a snapshot, and the status may not be valid one moment later when the screen is displayed.
The trace data is not continuously written to the file - for performance reasons it is buffered. Only when the buffer is full (default size is 1MB) is the data transferred in one go to the trace file.
The button Write Buffer writes the content of the buffer to the file.
The flush is triggered by a flag in the shared memory. The flush is always queried when a trace record has been written to the buffer. If a process writes no trace record at all (for example, because it is running in ABAP only, or it is hanging in the database for a very long time), it cannot empty the buffer.
In the bottom group box you will see a list of the trace files used. The list contains the file name, size, and time stamp of the first and last trace record.
The trace records are first written to a file called TRACE. Once this file has reached the maximum configured size, the file is renamed and a new file called TRACE is created. There is a maximum number of trace files that can be kept.
The trace files are managed internally in an index located in the shared memory area. The content of this table control is only the content of this index. You cannot physically look at the files. If there are any changes made to the files on the hard drive (you can easily delete them manually), the index must be rebuilt. Choose Build in the parameter settings (line with the maximum number of trace files).
Errors may occur when you write the trace files. To display details of the error choose the icon Error while writing the trace file from the title bar.
At the bottom of the screen you will see the message:
Caution: All times on this screen are specified in local server time
On the initial screen of the System Trace (ST01) all times are specified always in the time zone of the user (provided the user has specified a time zone. If they are not, the time in the time zone of the application server is used). In the Administration screen the times are always specified in the time zone of the application server (even if the user has defined a local time zone).