Friday, November 18, 2016

ABAP & JAVA stack checks



ABAP Stack Checks

Check process overview(SM51)
Check overall system process overview(SM66)
Check application servers status (SM51)
Check for any pending locks (SM12)
Check for any pending database locks (DB01)
Check for Dumps in the system(ST22)
Check  Outbound (SMQ1) entries
Check Inbound (SMQ2) entries
Check SMQR and SMQS (inbound & Oubound regestration)
Check System log for any errors(SM21)
Check for any hanged updates or update status(SM13)
Check for excessive swapping and buffer monitoring (ST02)
Check for critical job status like backup,updatestats,checkdb etc(DB13)
Check for long running/failed jobs status(SM37)
Check database alertlogs and performance(ST04)
Check spool job status (SP01)
Check STO6 for OS monitoring
Check cache status (sxi_cache) for PI System
Check SLD functionality(SLDCHECK)
Check SXI_MONITOR for XI/PI system
Check SXMB_ADMIN for XI/PI system
Check for Tablespaces,Missing indexes in DB02
Check ST03 for workload analysis.
Check SM58 for Trfc entries
Check SP12 spool buffer consistency

...............................................................................................................................................................
SM50:

Work process over view:




Transaction code SM50 is used to monitor and manage work processes. In the work process overview, you can:

• End an ABAP program that is running.
• Debug an ABAP program that is running.
• Cancel a process (with or without core) – long running jobs
• End a session
• Activate/deactivate the restart option after an error
• Execute various functions for the process trace

No:
The internal ID number of a process. Used to identify messages that belong to a work process
 in the system log.

Type:
• DIA: Work process for executing dialog steps in user transactions.
• UPD: Update process for making U1 (time-critical) database changes.
• UP2: Update process for executing U2 (not time-critical) database changes.
• ENQ: For locking or releasing SAP lock objects.
• BTC: For processing background jobs.
• SPO: For spool formatting processes.

PID:
Process ID of the work process (on the operating system).

Status:
• Running (executing a request)
• Waiting (idle and waiting for work)
• Hold (held for one user) is not an abnormal state, but a work process can only serve a single user.
If too many processes are in hold status, then system performance suffers.
You can use the Reason column to identify work processes with status hold that
can be released.
• Stopped (aborted with Restart set to No)

Reason:
If a work process is in hold status, the reason is displayed. Typical reasons are: Debugging, CPIC activity, locks, updates, GUI (system waits for response from the SAPGUI front-end program, for example, for a remote function call (RFC)). You may also see PRIV (PRIVate use) as a reason for holding a work process. PRIV indicates that a work process is reserved for a single user for memory management use. The work process has exceeded the limit of the SAP memory that is used by other processes. The process is held as long as the current user requires local memory.

Start:
Indicates whether the process should be automatically restarted if a process ends prematurely. You can change the restart status of a process by choosing Process > Restart after error > Yes/No. Normally, leave Restart set to Yes. If a work process aborts during its startup, the system automatically sets Restart to No. This measure protects against endless attempts to restart a process if a database system is not available, or another serious problem is affecting the system. After correcting the problem, you can change Restart to Yes so that the system starts the work processes.

Error
Indicates how many times a work process has aborted.

Sem:
Indicates the number of the semaphore for which a work process is waiting. Normally, this field should be empty. If one or more semaphore numbers frequently appears, evaluate the performance of your system using the Performance Monitor.

CPU:
Cumulative CPU time since the start of a work process.

Time:
Indicates the elapsed time used by a work process for the dialog step that it is currently processing

• Report – ABAP program or report that is currently being executed
• Client – Client for the session that is currently being executed
• User – User whose request is currently being processed
• Action – Action that is being executed by the current program. The actions displayed are recorded by the SAP Performance Monitor. The Performance Monitor must be active (SAP profile parameter stat/level = 1(default)) for actions or database table accesses to be displayed.
• Table – If the database is being accessed, this column shows the name of the table being accessed.
.................................................................................................................................................................

SM66:  Global work process over view:




SAP SM50 transaction is used to report information for all configured SAP work processes under 
one SAP server/instance while SAP SM66 reports all occupied SAP work processes from all servers/instances of a SAP system

Transaction code SM66 is used to quickly investigate the potential cause of a system performance problem by checking the work process load. You can use the global work process overview to:

• Monitor the work process load on all active instances across the system
• Identify locks in the database (lock waits).

Using the Global Work Process Overview screen, you can see at a glance:

• The status of each application server
• The reason why it is not running
• Whether it has been restarted
• The CPU and request run time
• The user who has logged on and the client that they logged on to

• The report that is running

................................................................................................................................................................

SM51: List of active servers:




Transaction code SM51 is to display list of active application servers that have registered in the SAP message server. Further, you can manage & display the status, users, work process in all application servers belonging to the SAP System.

In this example the SAP system only has 1 application server. (See the indication at the bottom *** 1 active servers ***)
It doesn’t mean there is only one server configured on this system, but that only one is up and running for now, and because we want to check the work processes, that’s the only information we need to know.

So here you have two options, which are in this case do exactly the same thing. Either go to the SM50 transaction and double-click the Server Name. Please note, if you had more than one server being displayed then the only option left would be to double-click the Server Name to open the SM50 transaction on the targeted server.

By Double-Clicking or going to SM50 you have a screen similar to the one below:

.................................................................................................................................................................

SM12:

The SAP System is equipped with a special lock mechanism that synchronizes access to data on the database. 

The purpose of the lock mechanism is to prevent two transactions from changing the same data on 
the database simultaneously.

Lock entries are usually set and deleted automatically when user programs access a data object & release it again. The lock mechanism is closely related to the Update Mechanism.

                                         



1. You can use SM12 to check and delete lock entries.
2. In SM12, check any lock entry older > 2 days. If any outdated entry found, check the corresponding user is user online/offline in AL08 or SM04 (you can get the transaction code that been use by the user). Get the user contact from SU01 and inform about the lock else if the user is offline, release the table from lock by deleting the lock.

Note:
Important profile parameters for the lock concept:-

• enque/table_size – Size of the lock table managed by the enqueue server in the main memory. The lock table contains information on which locks are currently held by whom. You can check whether the update server is functioning correctly, since the lock table can grow very fast if the update function stops. If no update problems exist, you can use this parameter to increase the size of the lock table. Default value: 4096Kb

• rdisp/wp_no_enq – Number of enqueue work processes that are to run on this instance.
• rdisp/enqname – Name of the application server that provides the enqueue service.

The lock mode:-

• Shared Lock (S) – Several users can access locked data at the same time in display mode. Requests from further shared locks are accepted, even if they are from different users. An exclusive lock set on an object that already has a shared lock will be rejected.
• Exclusive (E) – An exclusive lock protects the locked object against all types of locks from other transactions. Only the same lock owner can reset the lock .

-When there are thousands of SAP lock/enqueue entries
using those SM12 selection criteria is a better paractove when there.

1. use less system resource (memory,cpu..etc) by filtering
unnecessary data

2. Make it easy for you find what you are looking for since data
is filtered.

If you want to see all lock, keep blank fields and press enter


                                 


Imp Note: Pay attention to different color of rows

Blue color row: means that the lock has already been transferred to the update task
and lock entry has been writeen to a system level backup file.

This SAP mechanism is to prevent lock/enqueue loss due to system failure.
when system reboot , lock entry in backup file would be imported to SAP lock/Enqueue table
which is in memory.


While Color means that the lock in that row is (still) held by the non-updating task owner
owner like SAP dialog work process.

To review the lock entries,Double click on lock entry.


                              



For explanation on field displayed in lock entry list:
                                                 




Review Lock/Enqueue statistics:

SM12 -> Extras -> Statistics

      






                           
Top capacity used

Sm12 -> Extras -> Top capacity

There are three options:

Current
History
Delete History



















                    















Java Stack Checks:

Check java portal accessibility using link
Check server0 log for java system for critical errors
Check accessibility of management console
Check server node status
Check default trace for critical java errors
Check java reports for memoryconsumption/swapping

Os-level checks

Check filesystems usage (shouldb be <90%)
Check for swap space using topas/nmon etc
Check for work directory log files at oslevel for errors
Check work dir logs
Cluster/server0 logs for java system performance issues.



3 comments: