Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Purpose

Help you to understand the DPMON tool functionalities, in order to help efficiently monitoring the system without access to transactions like SM50 or SM66.

 

Overview

This page contains information about the DPMON and the functinalities available in this tool, aiming to explain the purpose of each one of them. 

The DPMON Tool

All the crucial SAP kernel processes like dispatcher, gateway, message server, ICM, enqueue have their correspondent monitor tool. The DPMON stands for dispatcher monitor, meaning that it can access the main dispatcher monitoring functionalities through OS level.

In order to use DPMON, you must be logged with the <sid>adm user in the OS level and run the below command.

 

dpmon pf=<path to profile/profile name of the instance> 

 

You will be taken to the DPMON initial screen and access the main menu by entering the option m. In the image below you can see the dispatcher monitor main menu for a 740 system.
 

Functionalities

This chapter is going to abord each functionality listed in the DPMON main menu, divided into one subchapter for each of them. 

Dispatcher Queue Statistics

By using the options d or e in the DPMON main menu you'll have access to the dispatcher queue statistics. For more information details about the dispatcher queue and the work processes refer to Dispatcher Queue Info.

Depending on the kernel version you are using, the DPMON output for this function will be different. As you can see in the below image the queue information for DISP, GW, ICM and LWP are displayed meaning this is a 740 or newer kernel release.

In case you are using the option e in the DPMON main menu, the dispatcher sessions details will also be displayed. This concept was introduced as from kernel 740 and is not present in older releases.

The dispatcher queue statistics are very useful to detect dispatcher queue overflow situations and also bottlnecks in the work processes of an specific instance. The SAP Note 15606 provides more details about the dispatcher queue overflow situation.

Work Process Admin Table

The work process admin table can be accessed by using the options p or l in the DPMON main menu. The option p will display the standard view of the work process table and the option l will display the long version of the work process table which includes the columns Action and Action-Info.

This is one of the most useful functionalities provided by DPMON for analysis since you can easily detect system hanging situations where no work processes are free to process new requests. The columns Sem will clearly display semaphores requested or hold by the work processes. The column State will display the work process status where you can see whether it is free, processing or waiting for some action. The column Action will inform the current action of the work process and Action Info will provide more details about this current action (e.g. Sequential Read in table SWNCMONI).

From this sub menu, option "e - create snapshot" can be used for writing a SERVER SNAPSHOT on the dispatcher trace file.

Trace Level/Components for WP

This functionality can be accessed by using option t in the DPMON main menu. It displays work processes details like number, type, PID, current trace level and components. For more details about the SAP processes traces and trace level, including the different components, refer to the SAP Note 112.

By using the option t in the menu that will be available inside this functionality you can change the trace level for an specific work process and also specify the components you want to trace as you can see in the below image. You can perform the same trace level change for the work processes by using transaction SM50 from inside the SAP system.

Communication Blocks

This functionality can be accessed by using option w in the DPMON main menu. It displays all the communication blocks used by work processes of an specific instance, matching the ID of the block occupied with the PID of the correspondent work process.

The work process communication blocks are used for internal server communication. Communication blocks are required for all the requests with associated data. The number of blocks is defined by the parameter rdisp/wp_ca_blk_no as per the SAP Note 3223.

In systems running kernels released before the kernel 740 you will find this option shown as wp_ca blocks in the DPMON main menu.

Dump Binary Content of Shared Memory Blocks

This functionality aims to provide dump information for memory areas for developer, used in special cases of analysis. You can see in the image below the areas for which this information can be obtained.

Comm Adm Blocks

This functionality can be accessed by using the option c in the DPMON main menu. It displays the communication table of an specific instance. The communication table shows the active RFC connections to the application server. Both connections where the local dispatcher is the client and connections where the local dispatcher is the server are displayed (the connections that were made externally to the server). For more details refer to Communication Table.

This table can be reached from inside the SAP system by accessing transaction SM51, highlighting an specific instance and going to GoTo -> Information -> Communication and selecting RFC Connection.

The communication table helps you keep track of the RFC connections when monitoring the system or analyzing problems.

APPC_CA Blocks

This functionality can be accessed by using the option a in the DPMON main menu only in systems with kernel older than kernel 740. The appc_ca blocks are used when requests are transported from an work process to or from the Gateway. app_ca and appc_ca_adm stands for advanced program-to-program communication. These blocks contains additional request data.
 

The output of this functionality is similar to the WP_CA (Comm Adm Blocks) in the previous subchapter. 

The number of blocks is defined by the parameter rdisp/appc_ca_blk_no as per the SAP Note 3223.

J2EE Adm Area

This functionality can be accessed by using the option j in the DPMON main menu. It is mainly used in dual-stack systems (J2EE+ABAP) where you can see if the J2EE Engine is started and also a summary of the J2EE engine status with the number of errors, path of the jcontrol executable, state and others.

MBUF Status

This functionality can be accessed by using option m in the DPMON main menu. It displays the Message Server status correspondent to the system. The same status displayed in this functionality is also shown in the dispatcher trace dev_disp. The hardware ID is shown which can be used for software licensing purposes.

The total number of instances and their respective names are listed by the message server additionally to its status and operation mode.

This functionality can be used for the analysis of the connection between the instances and the message server and to check whether message server reports correctly all the instances which are currently up and running in the system.

Service Buffer Status

The dispatcher contains mechanisms to buffer the message server list, message server hardware ID and the ICM service list. This functionality displays the active services in the dispatcher buffer related to the ICM and allows this buffering to be deactivated.

Session Table

This option displays the dispatcher session table. The information displayed is similar to the one obtained in transaction SM04 where you can see user name, client, session name, terminal, with its correspondent priority, between other important details.

The output can be used for the analysis of sessions currently active in the instance, however accessed from the operating system layer. In case the limit of session in the instance is reached for some reason, this situation can easily be identified using this functionality.

Sys_ad Dump

This functionality can be accessed by using the option z in the DPMON main menu. Its objective is to display the content of the sys_adm structure of the dispatcher, where you can see the current kernel details, instance name, state of some of the critical processes, number of contexts used in ICM, between others.

Create Assertion Ticked

This functionality can be accessed by using the option a in the main DPMON menu. It allows an Assertion Ticket to be created for authentication purposes.

Show Suspend Info

This functionality can be accessed by using the option f in the DPMON main menu. It allows you to check the dispatcher current state, suspend a server, resume the server status, suspend the entire system and also resume the entire system. The function also displays information regarding the number sessions, messages and calls in the total or the current waiting ones.

The suspend option is used in order to stop the instance from operating. The work processes of this instance will be occupied until the suspend request is removed with the options "resume server" or "resume system".

Maintain Profile Parameters

This functionality is available only in systems running kernel older than kernel 740 and can be reached by using the option e in the DPMON main menu. 

By using this option you can change the value of any profile parameter in the mentioned profile passed as parameter in the dpmon command you have initially run. As you can see below, the DPMON will display the current value of the parameter and request a new value to be inserted.

Tm_adm Dump 

This functionality available only in systems running kernel older than kernel 740 and can be reached by using the option v in the DPMON main menu. 

Similar for the wp_adm area to the Work Process, the tm_adm area is a structured memory cell to store information regarding SAPgui (tm stands for "terminal"). A cell of tm_adm contains information about which user is connected via a SAPgui, and information about all main modes of this user.

DPMON Useful Scripts

There are many useful scripts that can use the DPMON output in order to continuously monitor the usage of a specific resource (e.g. Work Process actions) for analysis. 

The below script will take the output of the work process table long version and direct it to a text file called dpmon.log every 30 seconds. With this kind of log file you can have a clear view of the consumption of the work process during an specific task you are performing in the system, for example.

echo start > dpmon.log
i=1
while (i=1)
do
   echo q | dpmon pf=<Path to Profile>/<Instance-Profile> l >> dpmon.log
   date >> dpmon.log
   sleep 30
done

The below script has the same mechanism than the one to collect the work process information above mentioned, however, instead of collecting the work process information, it will collect the dispatcher queue information where you can analyze possible bottleneck situations in a determined period when the script is running.

echo start > dpmon.log
i=1
while (i=1)
do
   echo q | dpmon pf=<Path to Profile>/<Instance-Profile> d >> dpmon.log
   date >> dpmon.log
   sleep 30
done


Execute dpmon without user interaction

When you run dpmon commands it waits for the user input. It is possible to run wihtout an interactive way:

Resolution 1, using pipe in command line

Some examples are listed as below. In these examples, the echo command is used as an input for dpmon command.

echo q | dpmon pf=<profile> lcommand to show "l - work-process-admin-table (long)" directly.
echo q | dpmon pf=<profile> dcommand to show "d - dispatcher queue statistics" directly.
echo q | dpmon pf=<profile> l  >result.txtShow "l - work-process-admin-table (long)" directly, and ouput the result to result.txt

 

Resolution 2, using an OS file as an input to dpmon

Ceated a OS file named input_for_dpmon.txt. Let the file contains only one character q which is used as quit for dpmon. Then you can run the examples below. In this examples, the full path of input_for_dpmon.txt is D:\input_for_dpmon.txt.  In your environment, this may be different.

dpmon pf=<profile> l <D:\input_for_dpmon.txtcommand to show "l - work-process-admin-table (long)" directly.
dpmon pf=<profile> d <D:\input_for_dpmon.txtcommand to show "d - dispatcher queue statistics" directly.
dpmon pf=<profile> l <D:\input_for_dpmon.txt >result.txtShow "l - work-process-admin-table (long)" directly, and ouput the result to result.txt

Related Documents

Dispatcher Queue Info

Communication Table

Assertion Ticket

Related SAP Notes/KBAs

SAP Note 15606 - Overflow of dispatcher request queue

SAP Note 112 - Trace and error information in the "dev_" files

SAP Note 3223 - Number of WP and APPC blocks

SAP Note 675778- Analysis after system downtime