Viewing Log and Trace Files

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 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 icmmsg 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.
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.
  3. From the stack traces in the log files, jump to the source code (if available in workspaces).
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 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.
Analyze 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.
The Log View Tool Bar
The tool bar contains of six menu icons.
Icon
Use
Refresh
Refresh the change logs of an 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.

2 comments:

  1. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Projects for CSE It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai


    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

    ReplyDelete

Copyright © 2013 VENKAT SAP BASIS