Search This Blog

Sunday, April 20, 2008

Monitoring the System Work Processes (SM50)

To display the status of the work processes of the application server where you are logged on to, select Tools Administration Monitor System monitoring Process overview (transaction code SM50). Administrators should regularly monitor the system processes to determine if the number and configuration is appropriate.


Notice that you can only display the processes of your local system.


The SAP work processes correspond to operating system processes. You could also monitor these processes from the operating system. In fact, the field PID matches exactly to the Process Id of the underlying operating system. With a UNIX command such as ps −eaf \ grep dw, you can see the SAP processes. On Windows NT systems you can see the processes from the Task Manager as disp+work.

The SAP runtime directory (/usr/sap//SYS/exe/run) contains some monitor programs which allow you to see some of the work processes and the dispatcher from the operating system.



The columns in the work process overview screen show the following information:
No. Refers to the internal ID number of a process. It is useful for identifying messages in the system log belonging to a work process.
¨
Ty. It's the type of work process. On this screen, you can find the following types:
¨DIA. Dialog work processes, in charge of executing interactive dialog steps
¨UPD. Update work process for executing U1 update components). In charge of critical updates on the database ¨
¨UP2. Update work process for executing U2 update components. In charge of performing
secondary updates on the database¨
¨ ENQ. Enqueue work process in charge of setting and releasing lock objects
¨BTC. Background work processes, in charge of executing background jobs
¨SPO. Spool work process in charge of the SAP spooling system (formatting and printing)

PID. Process identification number of the work process which matches the PID of the operating system process.
¨
Status. Shows the current state of the work process. Observe that the process overview screen always offers a snapshot of the processes. So, upon pressing the Refresh icon, it can change. Possible process status are
¨ Running. The process is executing a system request.
¨ Waiting. The process is idle and waiting for any system request.
¨ Hold. The process is held by a single user. Although a Hold state can be normal, having too
many processes in hold state affects the system performance.
¨ Killed or Complet. The process has been aborted with the Restart option set to No.
¨ Stopped. Due to system or application error, the process has stopped and could not restart
automatically.

When the process overview displays many processes with status waiting, it means that the system load is low. When this happens, the SAP dispatcher will try to allocate the same work process for a user, and thus avoid rolling in and out the user contexts.

Reason. This column displays a mnemonic code displaying the reason for a work process with a hold status. Some of the reasons can be activities performed by the lock mechanism, the update process, debugging, CPIC tasks, or RFC requests. If the reason columns display Priv, it means that a work process has been reserved for a private use in a particular ABAP transaction requiring a large paging storage. This mechanism prevents the rolling in and out of the user contexts and the ABAP paging.
¨
Start. This column has either the values Yes or No and indicates whether the work process will be automatically restarted in the event of an abnormal termination. Normally, this field is set to Yes butyou can switch the restart status by selecting the function Restart after error from the Process menu.

Err. Contains the number of times a work process has terminated abnormally.

Sem. This column can contain the number of the semaphore on which a work process is waiting.
Normally, this field is empty. However if you notice that a semaphore number appears often, it might indicate some performance problems in the system and might need some parameter adjustments.

CPU. Contains in number of seconds the CPU time consumed by a work process.

Time. Indicates the elapsed execution time used by the work process for the dialog step that it is currently processing. This column usually contains a small figure. When it displays a large figure, it might indicate that the process is being held in a debugging session.

Program. This column contains the ABAP program that is currently executing.

Client. Indicates the SAP system client where the session is being executed.

User. Contains the user ID whose request is being processed.

Action. Under this field the system shows the actions being performed by the running program. These actions are the same as those recorded by the system performance monitor which is activated by default with the profile parameter stat / level. This column might display actions such as sequential read, insert, or direct read.

Table. This column displays the name of the tables being accessed, if any.



There is more detailed information available from the process overview screen which you can display by selecting the work processes and then clicking on the Detail info button on the application toolbar. With this option, in addition to all the information from the overview screen, the system displays statistical information about the work process such as the memory, development environment, and database usage.


You can terminate a work process with or without generating a core dump file in the operating systems, which can be used for debugging. Before canceling a work process, you should select the menu function Restart after error, either with options Yes or No, to indicate whether the process which is to be canceled should restart or not, after being manually terminated.


To display a trace, choose the work process and, from the menu, select Process -> Trace -> Display file.


By selecting the work process and clicking on the Delete session button on the application toolbar you can also delete a user session and release the work process. However, you should avoid performing this function from this overview, since the work processes can be attending several users, and you could unintentionally affect other users' work. Rather, you should delete a user session from the User overview screen(SM04)

No comments:

Post a Comment