Show TOC

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

 

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

The log viewing functions of the SAP Management Console perspective provide you the following features:

  • Viewing all system log and trace files

  • Viewing developer trace files

  • Creating 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/<SAPSID>/<instance_name>/work, where <SAPSID> is the SAP 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 processes and the applications running on top of AS Java are stored in the /usr/sap/<SAPSID>\<instance_name>/j2ee/cluster/server<n>/log directory.

Procedure

  • Proceed as follows to view the developer trace file of a process:

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

    1. In the navigation view, choose the   AS Java   Process Table   node

    2. Select the relevant process in the Content View.

    3. From the context menu, choose Show Developer Trace. The SAP Management Console perspective displays detailed information in the Log File View.

      Note Note

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

      End of the note.

      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.

  • Proceed as follows to view special logs and traces:

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

    You can choose between the following options:

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

    • To view log records of all log and trace files filtered by time and severity, select an instance or system, and choose Analyze Log Files from the context menu. 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.

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

  • Proceed as follows to dump the Java stack trace of the server processes:

    1. Select the relevant server process and choose Dump Stack from the context menu.

      The resulting Java server stack trace is stored in the dev_server<n> file in the /usr/sap/<SAPSID>/<instance_name>/work directory.

    2. To view the dump stack trace choose Show Developer Trace from the context menu 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.
  • Proceed as follows to view all log and trace files of an instance from the Log Files node:

    1. Select the Log Files node from the tree structure of the relevant instance.

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

    3. From the stack traces in the log files, you can jump to the source code (if available in workspaces).

      The SAP Management Console perspective displays the detailed information of the relevant log file in the Log File View as follows:

      • Log File View

        The Log File View is located at the bottom of the SAP Management Console perspective. Depending on the format of the log file it will be displayed as a table or as text.

        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.

      • Analyzing log files:

        The default parameters for the analysis of log files is severity error, last 10 minutes, and a maximum of 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. Once the parameters match your needs, choose the Refresh button. The analysis will be triggered. Full text search and highlighted results for text log files are available.

        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 the following menu icons:

        Icon

        Use

        Refresh Table

        Refresh the change logs of an AS Java server

        Clear Log File Table

        Delete the content of the currently selected tab.

        Close All Tabs

        Use as quick link to close all open tabs.

        Scroll Lock

        Lock scrolling on auto refresh.

        Activate/Deactive Filter

        Toggle server filtering.

        Show the default traces for the default system

        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.

        Proceed as follows to set a filter:

        1. Open the view menu Filters ...

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

        2. Select the desired field, for example User, and enter a search expression. Wild cards are supported.

        3. Close the window.

        4. Enable the filter in the tool bar.

        5. Choose Auto refresh or refresh the log file.