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
-
server-alias-name
Specifies the alias name of the active server whose specified server information is to be passed to (inherited by) the paired standby server. This option also specifies the alias name of the server whose inherited server information is to be referenced and displayed.
-
-p inherited-server-information
Specifies the inherited server information that is to be passed to (inherited by) the paired standby server. You can specify inherited server information as a path name consisting of up to 80 single-byte characters. For details about how to specify path names, see (2) Component symbols.
If you specify the -p option, you cannot omit specification of inherited server information.
-
-g
Specifies that existing inherited server information from the specified server is to be referenced or output to the standard output.
Return codes
Value |
Meaning |
---|---|
0 |
Normal termination (inherited server information has been specified, referenced, or displayed) |
Other than 0 |
Abnormal termination |
Notes
-
This command cannot be used in the online serverless mode.
-
The specified inherited server information is inherited when pairing is established between active and standby servers.
-
If the specified inherited server information consists of 81 or more single-byte characters, it will not be processed or inherited.
-
If the specified server alias name belongs to a standby server, the information will not be processed or inherited.
-
You specify inherited server information for a specific server. Only one instance of inherited server information can be specified per server.
-
Execute the command that specifies the inherited server information when the active server's startup processing begins (online -s start).
-
The return code is also set to 0 when any of the following messages is issued while type2 is specified in the exitcode operand in the HA Monitor environment settings:
KAMN021-E, KAMN322-E, KAMN372-E, KAMN465-E
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
-