System Monitoring in SAP

SAP: World Leader Software

SAP is a world leader in producing software for organizations. Its Enterprise Resource Planning (ERP) software is one of the world’s leading tools for incorporating several areas/processes of a business. However, using the SAP software necessitates a need to constantly monitor the performance of the various systems, to make sure they are performing optimally. This involves monitoring the system servers, the health of your systems, the connections, and vital applications.

SAP monitoring helps to identify any potential issues with the systems before they evolve into a larger problem for the business. Efficient organizations run daily automated system monitoring because it helps to easily diagnose the causes of problems, and to resolves them as quickly as possible.

I learned system monitoring in SAP the hard way. Therefore, if you are a system engineer, or IT database administrator, or an SAP basis engineer, or you’re simply interested in running a flawless SAP system, you would find this article very helpful. It provides a technical guide to helping anyone conduct system monitoring in SAP.

SAP System Monitoring Tools or Tasks

The SAP system provides a number of tools for monitoring the several areas of its systems. The tools are accessible via the Administration menu on the software. You can access the menu by going through the following protocol: Administration > System Administration or on transaction S002 > Administration and Monitors.

The tasks are:

  • Consistency Check
  • Overview of SAP Application Servers
  • ABAP Dump Analysis
  • Database Check
  • Database Available Space
  • Monitoring Batch Jobs
  • Spool Request Monitoring
  • CPU Utilization
  • Monitoring Lock Entries
  • Number of Print Requests
  • Monitoring Individual Instances Work Processes
  • Display and Control Work Processes
  • Monitoring System Log
  • Administration and Monitoring of the SAP Message Servers
  • Trace Functions
  • Managing PFC Connections Using SAP Gateway Monitor
  • HTTP Logging
  • Monitoring Update Processes
  • Buffer Statistics
  • Monitoring Application Users

The SAP help website provides a detailed explanation of some of these tools and their functions.

SAP System Monitoring and Health Check

SAP systems health check can be easily completed with the help of a list of transaction codes (T-CODES). These codes perform the functions that are correspondingly prescribed to them. However, these system checks vary in their frequency of use. Some can be done hourly, daily or even monthly. Here is a breakdown of the daily and monthly monitoring routines:

  1. Daily Monitoring Routines
    TCODES Description
    DB02 Space overview to check table space size
    DB12 Check for error in daily backup
    DB13 Database statistics log
    RZ04 View all operation mode configuration
    RZ10 Edit profiles in the case of error in any
    SM12 Check for old locks
    SM21 View all SAP system messages
    SM28 System inconsistencies check
    SM37 Review for cancelled jobs; check job logs
    SM50 Overview all server work processes
    SM51 View the list of all SAP servers (Central, Dialogue and Instances)
    SM59 Check configuration of RFC connection
    SM65 Check background servers connection
    SM66 Global work process overview
    SP01 View all spool requests
    SPAD View list of all printer devices
    ST04 Monitor performance and other database related key counters
    ST06 CPU utilization, memory status and swap
    ST22 View all the log of ABAP runtime error
    STMS Check transport management system (TMS) configuration
    TEMPDB Check drive space from Operating System (OS) levels
  2. Monthly Monitoring Routine
    T-CODES Description
    SAINT Check support package levels
    SGEN Check SAP load generator status; store frequently used objects of ABAP programs
    SLICENSE Check license details and license certificate validity
    SM51 Check kernel level; update if necessary
    STRUST Check SSO configuration

SAP Monitoring Best Practices

SAP System Downtime Monitoring

You might experience a system crash or a failed process in the operating system (OS) which could take down the servers. You can avoid or minimize this by establishing an automated alert system which checks the server status regularly and provides you information.

However, alert systems can fail to respond quickly enough. An effective alternative can be a cloud service. Most top cloud services provide a system to automatically check if system servers are running at optimal speeds. And they provide a feedback if they are not.

SAP System Availability or Accessibility Monitoring

Using an alert system is a brilliant way to notify you when your servers experience accessibility problems. However, using a cloud service which typically runs from a different primary network infrastructure – private providers, is a resourceful way to reduce SAP system accessibility problems. They automatically alert you when your servers are down.

Avoiding SAP File System or Log Space Unavailability

Having a full log or file system prevents logs from working. This happens because the previous logs remain on the system disks until they are backed up and released. It is important to avoid rashly deleting logs because it might lead to huge system problems.

An alternative is to set up your backed up logs, so that they are automatically released after a safe point. This would allow older logs to be overwritten by newer ones. Therefore, instead of simply deleting logs, it is better to set up a system to regularly archive old log backups. This would always free up space for more log entries to be made.

SAP Application Monitoring

A number of SAP Manager components use transaction SLG1’s application log. This means they use basic solution manager functions. SLG1 can also monitor the application log for other applications in the SAP Solution Manager. There are 18 important log objects in the SAP Solution Manager. They all have their sub-objects as asterisks (*). Some of the log objects in SLG1 are listed below:

ObjectSub-objectArea
/TMWFLOW/CMSCV*Application log /TMWFLOW/
AGSGEN*Generic extractor
AI_LMDB*Landscape management
AISDK*SAP Solution Manager service desk
CCDB*Configuration and change database
CRM_SOCM*Change Request Management
DIAGNAV*SAP Solution Manager diagnostics navigation
E2E_ALERTING*Monitoring and Alerting Infrastructure
E2E-CA*E2E change analysis
E2E-DIAG*SAP Solution Manager diagnostics
E2E-EA*E2E exception analysis
E2E-WA*E2E workload analysis
EEM*End User Experience Monitoring
LMDB*Landscape management database
RBE40*Solution documentation assistant
SDOK*SAP Knowledge Provider
SOLAR*SAP Solution Manager

How To Check Performance Issue in SAP

A system performance issue could arise because of many factors in the SAP system. Solving this problem requires a sound knowledge of the system infrastructure. Here are some common ways to diagnose problems with performance in SAP.

  1. Run the SAP transaction code ST06 to check the CPU, database response time, memory utilization, disk utilization and swaps. Being a daily monitoring task, the data collected from the system check can be compared to the data from the previous day to see what has changed in the system.
  2. Another method is to check the work processes using the SM66 transaction code to check if the SAP server is not running another software simultaneously.
  3. Furthermore, you can use baselines to know the normal system capability. Baselines are a form of graph that show the average response time of the system at each hour of every day of usage. A deviation from the average plotted points/baselines indicates a system malfunction.
  4. Using the transaction code RZ20, an alert can be set in SAP Computing Center Management System (CCMS) which sends you an email every time CPU usage exceeds 70%. This can be unreliable because the system would probably hit the 70% threshold a couple of times every day. It is also unreliable because the threshold is not based on any statistical data.

SAP System is Slow, How to Troubleshoot?

Troubleshoot and analyze a slow SAP system by following the steps below:

  1. Check Jobs using T-Code SM37Click on the “Job Log” option and search for the exact error message in the system, if you have any. Click on “Step” to go to the next page and then click “Parameter” to see the program name and parameter. Next, go to “MENU-Goto-Variant” to check the variant used by the job.
  2. Background Trace with ST12 (Single Transaction Analysis)This is the best method for a reproducible performance. It makes data easier to collect and analyze. Alter the ST12 settings, meaning you change the execution time to current system time and use background processing and confirm. Schedule ST12 trace.
  3. Advanced AnalysisCheck trace result. Check the time percentage bar.
    If ABAP takes the most time, it should be a program problem. However, if performance issue takes the most time, it is more likely a database problem.

There are mainly two issues in for a performance issue: it happens when a missing index or a wrong index has been used. Testing can be done using T-Code ST05.

For a missing index, the solution is to define a new secondary index for the table. While in the case of a wrong index, you can do the following:

  • Update table statistics.
  • Create database hints.

For a running job or a non-reproducible job,

  • Analyze with T-Code SM50
  • Trace with T-Code ST12 (get job details from SM37)
  • Check with STAD

In conclusion, following the aforementioned methods and running hourly, daily and monthly system monitoring will guarantee a smooth running of your entire SAP system infrastructure. If issues arise, they can help to quickly diagnose and resolve the problem.