Skip to Content
Technical Articles

Analyzing server snapshots with kernel snapshot analyzer

What is a server snapshot?

A server snapshot (also known as SAP Kernel snapshot) in SAP NetWeaver Application Server ABAP is a feature available from SAP Kernel 740. It is used to dump the most important application server information manually or automatically when the system is in abnormal situation, for example, request handling without progress.

A server snapshot contains most essential server status information including dispatcher scheduler information, queue statistics, work process table, session table, work process call stacks, PROC memory consumption, etc. With those information saved by the application server when the issue happened, the root cause analysis for SAP Kernel relevant issues will be easier than usual.

How to generate a snapshot?

The snapshot can be generated automatically when an application server detects any abnormal situation, for example:

  • Request handling without progress
  • A work processes is unexpectedly finished
  • Server hard shutdown
  • Exhausted resources
  • Etc.

The snapshot can also be created manually if you like (for example, you want to create a snapshot to dump all C-call stacks for all running work processes), you can use the following way to trigger a snapshot creation in SAP ABAP system:
SAP transaction: SM50 -> Administration->Snapshot -> Create

From operation system level, you can use the command tool – dpmon to trigger a snapshot creation:
run the monitoring tool dpmon, then using the following command to create a snapshot:
m – menue -> p – work-process-adm-table -> e – create snapshot
For more details about dpmon tool, please check here.

How to get the snapshot from system?

You can download the snapshot file from the SAP system.
Snapshot file is a zipped file which contains sufficient application server information to be analyzed, you can use the following way to download a snapshot files:
SAP transaction: SM50 -> Administration ->Snapshot -> Administration

In case you want to download the snapshot files from operation system directly, you can use the default file path:
/usr/sap/<System ID>/SYS/global/sapcontrol/snapshots/

Snapshot information is also written as text in the developer trace (dev_disp, dev_w[N], etc.), you can copy the application server work directory which contains all dev traces.
Default path for work directory on operation system level is:
/usr/sap/<System ID>/<Instance>/work/

How to analyze the snapshot?

You can use kernel snapshot analyzer to analyze a server snapshot.

The kernel snapshot analyzer is a lightweight Java tool to analyze the system abnormal behaviors using server snapshots in the snapshot file or work directory (developer traces).

To use kernel snapshot analyzer, please first make sure the JRE (Java Runtime Environment) is installed correctly on your computer (please use at lease JRE7 as the environment). Then you can download the KernelSnapshotAnalyzer.jar executable and introduction slides from the following link and run the tool locally.
Download kernel snapshot analyzer
(sha256 checksum of kernel_snapshot_analyzer.zip: f0af8114ba6715a4c22b7d7146e3a77d6b664592c81eeba26963d72db75605f1)

The main window of kernel snapshot analyzer and explanation is shown as following picture:

If you open the analysis report of snapshot 7 by double clicking the snapshot entry with snapshot No.7, you can see the following main summary page:

Then you can check the analysis report details and in case you want to save the analysis report, please use your browser’s “Save As…” feature.

Some more examples for the analysis report are shown below:

You can also refer to the SAP Knowledge Base Article 2640476 – How to analyze Server Snapshot with kernel snapshot analyzer.

Feedback

Please contact the blog author if you have any questions or ideas, in case you want to report a bug, please provide your snapshot file(s) and reproduce steps to the author.

Related Documents

DPMON Dispatcher Monitor
Snapshots in the SAP System

Be the first to leave a comment
You must be Logged on to comment or reply to a post.