Hitachi

For Linux(R) (x86) Systems HA Monitor Cluster Software


3.2.1 Monitoring a server in the monitor mode (for the active server)

This subsection explains the function for monitoring servers in the monitor mode. This function enables the hot standby operation to be performed automatically in the event of a server failure on a server in the monitor mode. Such a hot standby operation is performed as a planned hot standby.

If you use the monitor-mode program management function to monitor UAPs, also see 3.6 Function for controlling programs (monitor mode).

Organization of this subsection

(1) How to monitor servers

On a server in the monitor mode, the method to detect an application or task failure differs depending on the specifications of the application or task. Therefore, to notify HA Monitor that an application or task failure occurred, the user must create a server monitoring command.

A server monitoring command can be specified in either of the following ways:

In the following cases, we recommend that you specify a monitoring command by using the ptrlcmd_ex operand in the server environment definition:

The following describes the flow of failure monitoring processing in the case where the ptrlcmd_ex and patrolcommand operands are specified in the server environment definition.

(a) Specifying a monitoring command for the ptrlcmd_ex operand in the server environment definition

If a monitoring command is specified for the ptrlcmd_ex operand in the server environment definition, when startup of the server finishes, HA Monitor executes the command at regular intervals to determine the command execution result (EXIT code). The interval is specified in the ptrlcmd_ex_inter operand in the server environment definition. HA Monitor can detect a server failure from the EXIT code. If the ptrlcmd_ex_tmout operand is specified in the server environment definition and command execution does not end within the time specified for that operand, HA Monitor assumes that a slowdown occurred. In this case, HA Monitor determines that a server failure occurred on the server.

The following figure shows an overview of monitoring a failure on a server in the monitor mode (in the case where a monitoring command is specified for the ptrlcmd_ex operand in the server environment definition).

Figure 3‒1: Monitoring a failure on a server in the monitor mode (in the case where a monitoring command is specified for the ptrlcmd_ex operand in the server environment definition)

[Figure]

Important

If a monitoring command is specified for the ptrlcmd_ex operand in the server environment definition, the following items cannot be specified:

  • Setting of a monitoring command specified for the patrolcommand operand in the server environment definition

  • Monitor-mode program management function

For details about using HA Monitor to control the server monitoring command, see 4.1.4 Controlling the server monitoring command.

The monchange command allows you to change the settings and operations while HA Monitor and servers are running. You can use this command to temporarily stop and restart server monitoring. For details, see 9.6 monchange (changes settings and operations while HA Monitor and servers are running).

(b) Specifying a monitoring command for the patrolcommand operand in the server environment definition

If a monitoring command is specified for the patrolcommand operand in the server environment definition, HA Monitor automatically starts the command when startup of the server is completed. HA Monitor then checks for the command's process at 1-second intervals. When HA Monitor detects termination of the server monitoring command, it determines that a failure has occurred on the server.

The following figure shows an overview of monitoring a failure on a server in the monitor mode (in the case where a monitoring command is specified for the patrolcommand operand in the server environment definition).

Figure 3‒2: Monitoring a failure on a server in the monitor mode (in the case where a monitoring command is specified for the patrolcommand in the server environment definition)

[Figure]

For details about using HA Monitor to control the server monitoring command, see 4.1.4 Controlling the server monitoring command.

(2) HA Monitor processing after detection of a server failure

When HA Monitor detects a server failure, it performs one of the following operations:

For details about the processing flow for starting and terminating the server monitoring command, and for monitoring, see 4.1.4 Controlling the server monitoring command.

(3) Required environment settings

The user must create a server monitoring command. The user also must specify the created server monitoring command for the ptrlcmd_ex or patrolcommand operand in the server environment definition.

Some programs themselves provide a command for monitoring the program. For details about how to create a server monitoring command, see 6.13.3 Creating a server monitoring command.