Hitachi

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


9.11 moninfo (specifies server information in the active system that is to be inherited, or references and displays inherited server information in the standby system)

Format

moninfo server-alias-name {-p inherited-server-information|-g}

Users who can execute the command

Superuser and general user

Description

The moninfo command specifies server information that is to be passed from the active server to the paired standby server (inherited by the standby server) when pairing is established between an active server and a standby server. It is also used to reference and display server information in the standby system that has been inherited from the active server.

The moninfo command can be issued only from within a user command.

Options

Return codes

Value

Meaning

0

Normal termination (inherited server information has been specified, referenced, or displayed)

Other than 0

Abnormal termination

Notes

Examples

The following shows examples of the moninfo command in a user command.

Example 1

This example uses the moninfo -p command to specify an alias IP address that is to be used as a shared resource.

  • Target server alias name: server1

  • Alias IP address: 1.2.3.4

  • Timing of specifying the inherited server information: When the active server's startup processing begins (online -s start)

A portion of the user command is shown below. In this example, the specified alias IP address is passed to (inherited by) the standby server when pairing is established between the active and standby servers.

case "$2" in
"server1")
    case "$4" in
    "online")
        case "$5" in
        "-s")
        if [ "$6" = "start" ]
        then
#server1 online start!!
              moninfo server1 -p 1.2.3.4
        fi

Legend: Bold: Inherited server information that is specified

Example 2

This example uses the moninfo -g command to reference inherited server information and then passes it to a command that specifies an alias IP address.

  • Target server alias name: server1

  • Name of command that specifies an alias IP address: /sbin/ifconfig

  • Timing of passing the inherited server information: When hot standby processing is started on the standby server (standby -a start)

The following shows a portion of the user command:

case "$2" in
"server1")
    case "$4" in
    "standby")
        case "$5" in
        "-a")
        if [ "$6" = "start" ]
        then
#server1 system exchange start!!
               IPADDR='moninfo server1 -g'
               /sbin/ifconfig eth1:1 inet $IPADDR netmask 255.255.255.0 broadcast 1.2.3.255
               /sbin/arping -U -c 2 -I eth1 $IPADDR
               /bin/echo 0 > /proc/sys/net/ipv4/route/flush
        fi

Legend: Bold: Inherited server information that is referenced