Showing posts with label logs. Show all posts
Showing posts with label logs. Show all posts

Tuesday, February 22, 2022

Simplifying ABAP short dumps

ABAP dumps are very useful sources of an information about what went wrong in execution of particular ABAP code. When the code runs into runtime error due to e.g. an uncaught exception, an exit message, a failed assertion, missing authorization to access the object etc. there is the ABAP dump generated. The dup can be viewed in t-code ST22. The dump itself carries a lot of information about the SAP system and its environment. Be it: hostnames and or IP addresses of DB server, app server, terminal, user names, version of SAP system, kernel, DB, memory, even the data can be exposed in ABAP variables, internal tables etc.

In order to prevent a leak of potentially sensitive information like above mentioned an ABAP dump could be simplified. Instead of all information, only two parts of the dump can be presented to the user:

·        What happened? – shows brief description of the place where the code was aborted

·        What can I do? – shows basic information of what can be analyzed further

 

Technically the simplified ABAP dumps are displayed in case the user has no below authorization assigned to its profile:

Authorization object: S_DEVELOP

Activity:                  03

Object type:            ST22

The authorization check is performed in method CHECK_USER_AUTHORIZATION_ST22 of class CL_ST22_TOOLS.

 

More information:

2306423 - Hiding sensitive information from Short Dumps (ABAP)

Thursday, May 30, 2019

How to find out when and who ran what APD

Sometime it is needed to find out when some APDs were running, who ran them and so on. In case the APD name is known, it is easy. One just needs to go to APD maintenance part of t-code RSA1. That screen can be also accessed directly via t-code RSANWB. Here just particular APD needs to be displayed and there is a Monitor icon available on its tool bar.

The monitor of the APD has also separate t-code called RSANWB_MONITOR. Report behind this t-code  is called RSAN_PRR_MONITOR_NO_SEL_SCREEN. The report just submits other report RSAN_PRR_MONITOR. Finally, the later report calls FM RSAN_PRR_MONITOR_START where all logic of the APD monitor is developed.

However, what to do in case that APD name that ran is not known. In such a case t-code SLG1 can be leveraged. By supplying string RSANPR into Object field of the SLG1.

SLG1 -> Object = RSANPR

Wednesday, December 23, 2015

How to find trace file associated with ABAP dump

There is a lot of “magic” with in the ABAP dumps. I mean there is a lot of information hidden in there. Only very careful reading of the dump can help us a lot while analyzing an issue why the dump occurred. Today I’m not going to go through the all the information that is provided with the dump. There are very useful guides on this topic which can be found under following links: Part I, Part II.

Instead I just want to point to possibilities how to find a so called developer trace (or just trace) associated with the dump. The trace log is written by each kernel component (e.g. work processes, message server, gateway, etc.) and it depicts all of their activities.
The developer traces can be found in folder DIR_HOME of particular SAP instance. It usually points to “/usr/sap///work” directory. Here there are files with naming conversion dev_w stored.

So in case ABAP dump as you read it in tcode ST22 makes no sense to you; you may need to dig deeper into developer traces to find out low level details of issue. You can search for the trace corresponding to the ABAP dump as per their common date and time stamp.

To brose the developer traces you can use tcode ST11 – Error log File, or browse the folder with the traces via t-code AL11.

More information:

Analyzing Problems Using ABAP Short Dumps:  Part I, Part II

Types of trace/log generated by SAP system

The trace or log files are written by different SAP software components during different activities they are performing. They serve to purpose of revealing of errors that might occur. It is important to know where to find them and how to read them. In this blog post I focus on different types of trace/log that are generated by the SAP system.

In general we recognizes following traces within SAP:
·         System
·         Developer

In most cases the traces can be found in folder DIR_HOME of particular SAP instance. It usually points to “/usr/sap//DVEBMGS00/work” directory. Here there are files with naming convention stored:

DEVELOPER TRACES
These type of traces/logs are written by each kernel component (e.g. work processes, message server, gateway, etc.) and its depict all of their activities. Here are their types:
ABAP AS related log files
·         dev_w                   Work process traces, where n is work process ID
·         dev_wp                 Gateway work processes
·         dev_disp                       Dispatcher trace (ABAP)
·         dev_wdisp                    Trace of web dispatcher
·         dev_rd                         Gateway trace
·         dev_icm                       ICM trace
·         dev_ms                        Message server trace
·         dev_lg                         Local Gateway trace (LG-Layer, OSS connections to message server)
·         dev_cp                        Log of the SAP control program sapxpg
·         dev_xpg                       Log of all output from the external program
·         dev_evt                        External Event Raiser trace
·         dev_icf                        ICF (Internet Communication Framework) log file
·         dev_tp                        Transport control Program (tp) running using RFC logs (output of stdout)
·         dev_rfc                Developer Trace, where n is the number of the work process
·         dev_sapstart                Trace of startup phase (sapstart)
·         stderr<>                      Log of errors with sapstart process, during SAP ABAP AS start
o    stderr1: Info about the start process of database system.
o    stderr2: Info about the start process of message server
o    stderr3: Info about the start process of dispatcher
·         dev_st                         SAPGUI
·         vmc_w.log              SAP Virtual Machine Container (VMC) of JAVA AS, isolates individual users from each other 
·         vmc_w.trc              SAP Virtual Machine Container (VMC)
·         dev_moni                     Monitoring infrastructure trace
Enqueue server related
·         dev_enqadm                 Main enqueue server trace file
·         dev_eq*                       enqueue server trace, where n is workprocess ID
·         dev_enqlisten                Trace file of standalone enqueue server
·         dev_enqio_*                 Depending on the number of configured IO threads
·         dev_enqsig                   Log of processing of asynchronous signals from OS. Not on Win OS.
·         dev_enqsrv                  Trace is logged during start the enqueue server
·         dev_enqwork                Log of problems concerning actual enqueue processing
·         dev_enqrepl                  Log of communicates with replication server from thread
Replication server related
·         dev_enrepha                Log of events of the HA polling
·         dev_enrepsrv                Log of all components of enqueuer server except below ones.
·         dev_enrepsig                Log of processing of asynchronous signals of OS. Not on Win OS.

JAVA AS (J2EE) startup framework log files (restart)
·         dev_server             Java server stack trace
·         dev_server.out       Output to command line (output file)
·         dev_datcol*                  Snapshot generator for Java trace
·         dev_bootstrap               Trace of Application Server JAVA startup: Bootstrap phase
·         dev_bootstrap        as above
·         sdt_bootstrap.out output file of above
·         dev_deployment            Trace of Application Server JAVA startup: Deployment phase
·         dev_jstart                    Trace of Application Server JAVA startup: Start phase
·         dev_jcmon                   Trace of JCmon - native monitoring program
·         dev_sdm                      Software Development Manager for Java trace
·         sdt_sdm.out                 output file of above
·         dev_jcontrol                 trace of JControl framework which starts the bootstrap Java program
·         dev_dispatcher              Dispatcher trace (JAVA)
·         sdt_dispatcher.out         output file of above

In closing words of developer traces I just want to add that most of these files are available via tcode ST11 – Error log File.


SYSTEM TRACES
Manages in tcodes: ST05 – Performance trace or in ST01 – System trace. They are used to record internal SAP system activities. We recognize following system traces:
·         Authorization checks
·         Kernel functions
·         Kernel modules
·         Database accesses (SQL trace)
·         Table buffers
·         RFC calls
·         HTTP calls
·         Lock operations (client side)


Further information:
112 - Trace and error information in the "dev_" files