19.4 Monitoring
Because SAP PO is mostly used for business-critical processes, it’s important to monitor and keep track of what is happening to the SAP PO system. Monitoring of your SAP PO system can be achieved in several ways. The different possibilities to monitor both SAP BPM and AEX were outlined in Chapter 15.
As you might recall, it’s possible to monitor the message processing between the AEX and SAP BPM by using the following monitors:
-
Message Monitor
Provides an overview of all interfaces and shows (per integration scenario) the number of messages and their statuses. This is found under the Adapter Engine tab. -
Communication Channel Monitor
Provides a high-level overview of the status of all communication channels within the system. -
Java Proxy Runtime Monitor
Provides a high-level overview of the Java proxy runtime.
These monitors can be accessed via http://<hostname>:<port>/pimon.
To monitor and manage SAP BPM processes, you have to access SAP NetWeaver Administrator via http://<hostname>:<port>/nwa and then choose Operations • Processes and Tasks. From there, you can perform the following tasks:
-
Manage processes
This application is a central area for monitoring and managing SAP BPM processes. Administrators can view the process details, process instance flow, process definition flow, history, process context, and so on. -
Manage tasks
This application is a central area to monitor and manage process tasks. Administrators can view the task details, deadline details, history, task owners, and so on.
The monitoring options summarized previously were explored in more detail in Chapter 15. The remaining sections will explore additional monitoring possibilities that we haven’t yet discussed.
19.4.1 Runtime Workbench
The Runtime Workbench (RWB) is a central entry point to access several functions and overviews in the SAP PO system. It can be very useful for quick insight into the high-level status of certain components (see Figure 19.10).
It can also be used to view the status of the System Landscape Directory (SLD) registration or to execute SLD registration for components when required. Because the SLD registration is crucial for the SAP PO instance to function correctly, this is one of the first places to check in case of issues (see Figure 19.11).
Because each component of the SAP PO system needs to be registered in the SLD, all items should have a green status. This screen can also be used when something in the host or port configuration has been changed, and the registration needs to be executed again.
You can access the RWB via http://<hostname>:<port>/rwb.
19.4.2 Wily Enterprise Manager
Wily Enterprise Manager (Wiley EM) is delivered as a standard component within the SAP support contract and is free of charge. Within Wily EM, there are many standard dashboards that can help you analyze the current state of the Java stack. It also caters for historical analysis by providing historical data up to 30 days in the past.
It’s equipped with a console view that shows the high-level status of the system. For a deep-dive analysis, it provides a tool known as the Investigator. Wily EM also provides detailed insight for every node of the Java instance. The next sections will provide more insight into some of its features.
Performance Analysis Using Wily Enterprise Manager
Wily EM can be used to narrow down performance and stability issues within the Java stack, and it has some standard dashboards to monitor the most important key performance indicators (KPIs) of your Java stack. It also provides insight into the queues of the AEX and communication channels.
Besides being used for troubleshooting issues, Wily EM can (and should) be used to perform regular health checks on the system.
Monitor System and Application Thread Utilization
All activities within the Java stack are performed via threads. When the SAP PO system starts and thereafter on request, an initial and minimum thread count is allocated. Additional threads can be progressively allocated until the maximum usage has been reached. If the maximum number of threads becomes allocated and in use, then no additional processing can take place, and the system will basically come to a standstill.
In many cases, it’s sufficient to stick to the default number of system and application threads, but it’s important to regularly perform health checks on the system to check if the number of allocated threads remains stable or sufficient.
If you find that the thread utilization on the system is high, then further analysis should be performed to identify the root cause. Several reasons can justify a high number of threads being used by the system. Applications that weren’t properly closed, hanging sessions, a bug in the software, and so on can be among the possible reasons.
A system running out of its capacity can also justify such an issue. In that case, one of the possibilities to resolve the issue will be to configure an additional server node or install an additional application server.
Monitor Java Heap Utilization
All processing within the Java server node takes place in the JVM. The heap memory forms an important part of the JVM. When a process is started, it claims memory in the heap space to process requests. The garbage collection process is responsible for checking the heap memory at regular time intervals to verify whether the allocated memory segments (in the heap space) are still allocated to an active process. If that isn’t the case, then they will be moved to another space segment within the heap or be cleared.
19.4.3 SAP Management Console
The SAP Management Console (SAP MC) (see Figure 19.12) provides a common framework for centralized system management. SAP MC can be accessed via the following URL, which will launch a Java applet from the browser: http://<hostname>:5<instance_no>13.
SAP MC is responsible for the following tasks:
- Display the current system status.
- Monitor and control the SAP system (stop and start).
- Display log and trace files, profiles, parameters, and system environment.
- Display ICM statistics.
- Display and control Java instance processes.
- Monitor system alerts.
- List access points to the SAP system.
- Display information about threads, sessions, and caches.
- Display Java Virtual Machine garbage collection and heap information.
- Save the current system status information, which can be provided to SAP if support is required.
19.4.4 SAP Solution Manager Monitoring
Within SAP Solution Manager 7.1, there is specific monitoring functionality implemented for the monitoring of the SAP PO usage type. The main advantage of using the SAP Solution Manager monitoring tool is its ability to automate monitoring. It requires configuring thresholds on different system parameters in SAP Solution Manager. If those thresholds are reached, then an alert is triggered and sent to the administrator, so there’s no need for the system to be continuously or actively monitored by a human. The administrator’s interaction is needed when an alert event is received.
If you receive too many alert events on a particular interface or the technical system, then this can be an indication that the monitoring thresholds have been set incorrectly or that the SAP PO system needs tuning. The process of monitoring is a cyclic process, which means that it’s never finished. The monitoring configuration needs constant attention and needs to be adjusted according to the system behavior and business requirements.
Technical Monitoring provides a set of metrics on the technical components of your system landscape. This feature provides an overview of the overall system status. The most important items that can be monitored from this overview include the following:
- Status of the database
- Status of the operating system (file system utilization, memory, page file, etc.)
- Network throughput
- Status of the Java engine
- Number of used application and system threads
- Heap size allocation and number of garbage collections
The preceding metrics only represent a subset of all available metrics. These metrics are delivered via standard templates and can easily be adjusted to your own needs. You can add or remove metrics or even define your own metrics and thresholds.
The components that are available within the SAP PO monitoring part of SAP Solution Manager are as follows:
-
Component Monitoring
Component Monitoring shows the availability and performance of some components of your SAP PO landscape, such as the Integration Directory, Integration Repository, SLD availability, and so on. -
Communication Channel Monitoring
Communication Channel Monitoring lets you monitor one or multiple communication channels. You can define which communication channels are considered critical for your business needs and define specific alert rules on them. If one of these communication channels encounters problems, then you can have the system trigger alerts via a ticket, email, or even a text message on your phone. -
Interface Channel Monitoring
Interface Channel Monitoring monitors the interfaces and performance of connections between business-critical systems. This monitoring is executed in real time.
The following types of interfaces are supported:- Remote Function Calls (RFCs)
- Web services
- SAP PI
- SAP Gateway services
- Flat files
- iDocs
- Queued RFC (qRFC)
- Transactional RFC (tRFC)
- Background RFC (bgRFC)
19.4.5 Tracing
Trace information is generally used by developers or system administrators for debugging purposes to diagnose common problems with software. This section will explore some aspects of collecting traces on SAP PO.
Client-Side HTTP Tracing
HTTP and SOAP communication channels can easily be traced without the need for an external tracing tool. It’s possible to enable tracing per receiver channel by setting the XISOAPAdapterBean parameter in the Module Configuration screen in the communication channel, as shown in Figure 19.13.
The following parameter values can be used for XISOAPAdapterBean:
-
headers
Implies that only HTTP headers are traced. This is relevant for both HTTP request and response. -
plain
Implies that the whole HTTP request–response communication is traced (headers and body) in plain text. -
hex
Implies that a hex dump is traced for the whole HTTP request–response communication in the same format as the ICM implementation.
XPI Inspector
XPI Inspector is a diagnostics tool developed by SAP that can be accessed via a web interface. The tool can collect different types of information from the system, including configuration and traces, and it can perform configuration checks. To be more precise, the following types of information can be collected using XPI Inspector:
- Debug traces from messaging system
- Debug traces from the SAP XI module processor
- HTTP traces
- Open SQL traces
- Java Connector (JCo) traces
- Information about the overall system state
Consult SAP help to find the link to download the XPI Inspector software. After downloading the software, it can be deployed onto the Java stack via SAP Software Deployment Manager (SDM), SAP NetWeaver Developer Studio, Telnet, or Software Update Manager (SUM), depending on the release of your SAP PO system. Once deployed, the XPI Inspector can be accessed via http://<hostname>:<port>/xpi_inspector.
19.4.6 JVMMON
JVMMON is a monitoring tool that’s delivered as part of the SAP JVM. The tool provides a wide range of monitoring tasks. The JVMMON application can be found in the JVM directory and is delivered with a command-line tool and a separate tool with a graphical user interface.
The JVMMON application can be attached to a running SAP JVM and provides comprehensive monitoring information or controls various aspects of the JVM configuration. After selecting a running JVM, the following information about its current state is presented:
- Virtual machine-related information, such as version, platform, build information, and so on
- Stack traces, optionally enriched with additional descriptive information
- Class statistics in detail or short summary
- Information about the VM and the cluster memory consumption
- Heap dump, optionally enriched with additional information
- Information about the shared libraries loaded by the VM
- Garbage collection history information
Furthermore, the following actions can be performed on the JVM:
- Starting and stopping debugging on the fly
- Setting trace flags to enable or disable specific trace output
- Forcing a full garbage collection or a maximum compaction garbage collection
When the system is hanging or very poorly performing, and past thread dumps are no longer available in the system, you might need to generate dumps of the current situation. These thread dumps are often required by SAP support to help them troubleshoot customer issues.
When a very high amount of memory is allocated within a server node of the Java stack, the server node might generate a heap dump: the complete contents of the memory will be written to a dump file on the operating system level. In such a case, the server process will generally be restarted automatically by the startup and control framework. Heap dumps can also be performed manually using the JVMMON tool.
To analyze the contents of a heap dump, the memory analyzer tool can be used. The Java heap analyzer can be found within SAP NetWeaver Developer Studio as an Eclipse plugin.