Show TOC

Monitoring the Standalone Enqueue ServerLocate this document in the navigation structure

Use

You can monitor the enqueue server and the enqueue replication server using program ensmon ( ensmon.exe on Windows).

Prerequisites

The standalone enqueue server is running. In the following sections <profile> is the profile file that has been used to start one of the application servers. This contains the information required by the monitoring program.

More information: Installing the Standalone Enqueue Server

Procedure

The ensmon process connects to the enqueue server across the network. You must specify the name of the host on which the enqueue server is running, either by specifying the profile file pf=<profile> or using the call option -H <hostname>. You can specify the instance number of the enqueue server in the parameter -I <server instance>. If you want to start ensmon on a server on which the SAP standard services sapdpXX (XX= instance number) are not configured, you can specify the port directly using the option -S <serverport> (standard: 32XX).

If you call up ensmon without specifying any parameters, a short help text is displayed about the parameters:

standalone enqueue server monitor

=================================

usage: ensmon [--help|-help|-h] [pf=<profile>]

      [-H <hostname> [-I <serverinstance>|-S

<serverservicename/serverport>]]

      [<opcode>] [<parameters (depending on opcode)>]

Operation Codes

The behavior of the ensmon program is controlled using numerical operation codes ( opcodes). If you enter ensmon -help, an overview of these operation codes is displayed.

There are more parameters for most operation codes. The most important operation codes are 2 and 3. You use the operation code 3 to get a file from the enqueue server and save it to the local hard drive.

Monitoring

With operation code 2 you can determine the status of the enqueue server and the replication. This code can also be used by the HA software to monitor the enqueue server and the replication server This operation code has the following return codes, which can be evaluated directly.

  • 0: All OK: the enqueue server is running, the replication server is active (provided it has been configured)

  • 4: Warning: the enqueue server is running, the replication server has been configured (that is, parameters defined), but the replication server is still not active (possibly because of an error).

  • 8: Error: ensmon cannot connect to the enqueue server. The cause may be a network problem or an enqueue server problem.

ensmon also uses this operation code to display the replication status in plain text. The enqueue server keeps this status internally.

Depending on the current value of the replication status, ensmon delivers a new return code, which can be evaluated by the HA software.

Possible statuses are:

Status notification

Meaning

Return value

Replication is disabled in server

Replication mechanism is disabled: the profile parameter enque/server/replication has the value false.

0

Replication is enabled in server, but no repl. server is connected

The replication mechanism is enabled ( enque/server/replication = true), but no replication server is connected to the enqueue server.

4

Replication is enabled in server, repl. server is connected Still needs a copy of the repl. table

The replication server has opened the connection to the enqueue server, but still has to request the state transfer.

4

Replication is enabled in server, repl. server is connected The state transfer is currently getting prepared

The replication server has requested the state transfer, but the enqueue server still has to prepare it.

4

Replication is enabled in server, repl. server is connected The state transfer is currently getting collected

The enqueue server has started collecting the data for transferring the state. At this moment the enqueue server cannot process any requests (but, because of its multithreaded architecture, the enqueue server can accept further requests and collect them in an internal queue).

4

Replication is enabled in server, repl. server is connected State transfer is sent, but still waiting for confirmation

The enqueue server has transferred the state of the lock table to the replication server, but is still waiting for confirmation that the state has arrived successfully. From this state lock table changes are already sent in further requests to the replication server.

4

Replication is enabled in server, repl. server is connected, replication is active

Replication functions as normal

0

Replication is enabled in server, repl. server is connected, Shutdown command was sent to replication server

The replication server was stopped by the enqueue server.

4

Replication is enabled in server, repl. server is connected but the replication was suspended due to errors during state transfer

The replication has the state “suspended”.

4

Caution

The return code cannot be seen in the ensmon output. The value is stored (in UNIX) in the shell variable $?, and can be displayed with echo $?.

Note

You can set ensmon to automatic or use it interactively. If you set it to automatic, specify all options and the operation code when you call it, and use the output as required. If you use it interactively, skip the operation code when you call it and enter it interactively. This is shown in the example below:

Example

When you enter ensmon pf=<profile>, you will get the following output:

Try to connect to host binmain service sapdp54

Enqueue Server monitor main menu

================================

1: Dummy request

2: Get replication information

3: Get a file from the enqueue server

q: quit

h: help

==>

If you now enter the operation code 2, you will get:

get replinfo request executed successfully

Replication is enabled in server, but no repl. server is connected

============================================================

Information from the enqueue server side:

=========================================

. . . . .