Show TOC

Procedure documentationViewing Log and Trace Files Locate this document in the navigation structure

 

The trace and log messages contain important information about the system operations. It is helpful to check and analyze them if you experience errors or undesired behavior.

The SAP MC log viewing functions allow you to:

  • View all system log and trace files

  • View developer trace files

  • Create stack traces for the processes

Types of Log and Trace Files
  • Startup and control framework logs

    Contain information about the startup process. You can check these files if errors or undesired behavior occur during the startup process. By default, the data from the last three restarts is kept.

    • The developer trace files and system output of all the executables belonging to an instance are located in the directory \usr\sap\<SID>\<instance name>\work, where <SID> is the system ID (for example, CE1) and <instance name> is the instance name (for example, JC00 or SCS01).

  • AS Java logs

    The log and trace files generated by the AS Java process(es) and the applications running on top of AS Java are stored in the usr\sap\<SID>\<instance name>\j2ee\cluster\server<n>\log directory.

Procedure

Viewing Developer Trace Files

Developer traces are related to operating system processes such as icm, msg server or Abap work process belonging to an instance.

  1. To view the developer trace file of a process, in the result view, select the relevant process.

  2. From the context menu, choose Show Developer Trace. The SAP MC displays detailed information in the log file view.

  3. Optional: If the information in the developer trace is insufficient or too detailed, choose Increase/Decrease trace level to adjust the trace level to the desired level of detail.

    The following are the possible trace levels:

    • 0: No trace

    • 1: Error trace

    • 2: Complete process, short data trace

    • 3: Complete process, complete data trace

    By default, the trace level is set to 1. By choosing Increase/Decrease trace level, you move the trace level up/down by one level.

Special Logs and Traces

You can easily view special logs for both the server and instance nodes.

  1. To view the log file of the sapstartsrv service, select an instance, and from the context menu, choose Show Trace File.

  2. To view log records of all log and trace files filtered by time and severity, select an instance or system, and from the context menu, choose Analyze Log Files. The default values are 1000 lines per log file, severity error, and last 10 minutes. You can change these settings in the log view after the result is displayed.

  3. To view the configuration change logs of the SAP AS Java servers, select a system or instance, and from the context menu, choose Show Change Logs.

Dumping the Java Stack Trace
  1. To dump the server processes Java stack trace, select the relevant server process, and from the context menu choose Dump Stack.

    The resulting Java server stack trace is stored in the dev_server<n> file in the usr\sap\<SID>\<instance name>\work directory.

  2. To view the dump stack trace, from the context menu choose Show Developer Trace as described above).

    Note Note

    If the file is too large, in the Open file dev_server<n> dialog box, choose the required option.

    End of the note.
View Logs and Traces from Log Files Node
  1. To view all log and trace files of an instance, from the tree structure of the relevant instance, select the Log Files node.

  2. In the result view, select the file you want to view, and from the context menu, choose Show Log File.

The SAP MC displays the detailed information of the relevant log file in the log file view.

The Log File View

The log file view is located at the bottom of the SAP MC perspective. Depending on the format of the log file it will be displayed in a tabular or textual form.

If the log file is shown in a table you can filter the lines by providing a filter expression in the first line.

Auto Refreshing a Log File

Once the log file is shown, you can choose to update it at regular intervals. Select the Show End of Log File radio button and choose the Run button. Now new entries will be appended in accordance with the chosen update interval. The number of lines shown in the log view is limited to the Lines parameter.

Showing an Entire Log File

The default is to show only the last 1000 lines of a log file. Sometimes you would like to see a whole file. In this case, select Show Entire Log File and choose the Refresh button. If the radio button is inactive the current content is a concatenation of log files.

Analyze Log Files

The default parameters for the analysis of log files is severity error, last 10 minutes and max. 1000 lines of each log file in the result. You can modify each of these parameters in the header of the analyze log file tab. If the parameters match your needs choose the Refresh button. The analysis will be triggered.

Note Note

This operation is time and resource consuming. If you choose the parameters without care the operation may run for a very long time, and the result might be too large to be displayed.

End of the note.
The Log View Tool Bar

The tool bar contains of six menu icons.

Icon

Use

Refresh

Refresh the change logs of a AS Java server

Clear

Delete the content of the currently selected tab.

Remove

Use as quick link to close all open tabs.

Lock

Lock scrolling on auto refresh.

Filter

Toggle server filtering.

Syslog

Use as quick link to display the last 1000 lines of each default AS Java trace in the whole system.

Server Log File Filtering

If the log files are too large or the Analyze Log Files returns a result that cannot be displayed, you may decide to use server filtering. Server side filtering is only available on structured files.

  1. To set a filter, open the view menu Filters ...

  2. The available fields for the current log files are displayed in a new window.

  3. Select the desired field, for example User, and enter a search expression (wild cards are supported).

  4. Close the window.

  5. Enable the filter in the tool bar.

  6. Choose Auto refresh or refresh the log file.