 |
|
|
NAME
nhcmmstat - display information about
peer nodes, trigger a switchover, or force the qualification of a master-eligible
node
SYNOPSIS
nhcmmstat [-h] [-c command [-t] ] [-n nodeid]
The nhcmmstat tool displays information about a peer
node or a group of peer nodes, displays notifications sent by the nhcmmd daemon, and performs operations on the cluster. Use this
tool at regular intervals when you are performing tasks that might change
the status of a node.
The nhcmmstat tool provides the following information:
You can use the nhcmmstat tool to modify the state
of the cluster as shown in the examples section below.
For information about the role and attributes of a node, see the Netra High Availability Suite Foundation Services 2.1 6/03 CMM Programming Guide.
The following options are supported by nhcmmstat:
- -c
-
You can specify
the nhcmmstat command to be executed. The specified command
is executed and nhcmmstat exits. If this option is not
used, you use the nhcmmstat command in an interactive mode.
In this case, you must exit using the exit or quit command to return to the cursor.
- -h
-
Displays help.
- -n
-
You can specify
the nodeid of the node on which you want to run nhcmmstat. This option is obligatory when using the info or potential commands.
- -t
-
Shows the start
and end times.
The following commands can be used with the nhcmmstat
tool to get information about a single node:
-
info
-
Get information
about a node in the cluster. You must provide the nodeid
of the node.
-
local
-
Get the nodeid of the current node.
-
master
-
Get information
about the master node.
-
mynode
-
Get information
about the current node.
-
potential
-
Get
information about a node that is in the cluster node table but has the CMM_OUT_OF_CLUSTER role. You must provide the nodeid of the node.
When a node has the CMM_OUT_OF_CLUSTER role, the nhcmmstat tool gives meaningless values for the following administrative
attributes: CMM_ELIGIBLE_MEMBER, CMM_FLAG_DISQUALIFIED, and CMM_FLAG_SYNCHRO_NEEDED.
-
vice
-
Get information
about the vice-master node.
The following commands can be used with the nhcmmstat tool to get information about all peer nodes.
-
all
-
Get information
about all peer nodes except those with the role CMM_OUT_OF_CLUSTER.
-
count
-
Get a count
of the nodes in the cluster.
The following commands can be used with the nhcmmstat tool to modify the cluster. You must log in as superuser
to use these commands.
-
reload
-
Force
a reload of the cluster_nodes_table configuration. This
command can be run from the master node only. The supported operations are
add and remove a node in the cluster_nodes_table file,
with the node powered off.
To add nodes that are not included in the original cluster definition,
you must consider how the cluster was installed. For information about how
to add new diskless node or dataless nodes to a cluster, see the Netra High Availability Suite Foundation Services 2.1 6/03 Cluster Administration Guide. You cannot add a master-eligible
node to the cluster because there is a limit of two master-eligible nodes
per cluster.
-
so
-
Force mastership
change to the vice-master node. This command can be used on the master node
only, and when the vice-master is present and able to take the master role.
-
squalif
-
Force
the requalification for the current node to make it start an election. This
command can be used on a master-eligible node when no peer node is qualified
to be master. This command displays the following warning message:
Warning! This asynchronous command might take up to 300 s to
succeed!
Note that an unsynchronized master-eligible node can
only be elected as the master node if its former role was master.
The following commands can be used to exit from or get help with nhcmmstat:
-
exit
-
Exit.
-
help
-
Display
help information.
-
quit
-
Exit.
If an nhcmmstat command fails, an
error is displayed.
Notifications
When nhcmmstat is used in interactive mode, the following
notifications are emitted by the nhcmmd daemon and displayed.
-
CMM_INVALID_CLUSTER
-
"[USER CB] INVALID CLUSTER" is displayed. The cluster
is not in a coherent state. No information can be returned by the CMM API
until the cluster has been returned to a coherent state.
-
CMM_VALID_CLUSTER
-
"[USER CB] VALID CLUSTER" is displayed. The cluster
is in a coherent state.
-
CMM_STALE_CLUSTER
-
"[USER CB] STALE CLUSTER" is displayed. The cluster
has not had a master node for the preceding ten seconds.
-
CMM_MASTER_DEMOTED
-
"[USER CB] master demoted = %d" is displayed. %d
is replaced by the nodeid of the demoted master.
-
CMM_MASTER_ELECTED
-
"[USER CB] master elected = %d" is displayed. %d
is replaced by the nodeid of the new master. When
this notification is received, all available information about the master
is displayed.
-
CMM_MEMBER_LEFT
-
"[USER CB] member left cluster = %d" is displayed. %d is replaced
by the nodeid of the node that has left the cluster.
-
CMM_MEMBER_JOIN
-
"[USER CB] new node in cluster = %d" is displayed. %d is replaced
by the nodeid of the new node.
-
CMM_VICEMASTER_DEMOTED
-
"[USER CB] vice-master demoted = %d" is displayed.
%d is replaced by the nodeid of the demoted vice-master
node.
-
CMM_VICEMASTER_ELECTED
-
"[USER CB] vice-master elected = %d" is displayed.
%d is replaced by the nodeid of the new vice-master.
When this notification is received, all available information about the vice-master
is displayed.
When nhcmmstat is used in command
line mode the notifications are not displayed.
Node Information Displayed
When information is requested for a node, or when notifications of cluster
changes are received, the following information is displayed in the order
shown:
-
nodeid
-
The nodeid of the current node, followed by "[This is the
current node]" when the displayed information concerns the current
node.
-
domain_id
-
The domainid of the cluster of the current node.
-
name
-
The name
of the node as specified in the /SUNWcgha/remote/etc/cluster_nodes_table file.
-
role
-
The role
of the node in the cluster: master, vice-master, in, or out. The master, vice-master and out
roles correspond to CMM_MASTER, CMM_VICEMASTER, and CMM_OUT_OF_CLUSTER. A node that does not
have the CMM_OUT_OF_CLUSTER role, is in.
-
qualified
-
YES or NO is displayed. If YES,
the node is qualified to be master. If NO, the node is
not qualified to be master. This information is relevant for master-eligible
nodes only.
-
synchro
-
NEEDED or READY is displayed. If NEEDED, the master and vice-master shared file systems do not contain
the same information. If READY, the master and vice-master
node file systems contain the same information. This information is relevant
for master-eligible nodes only.
-
frozen
-
YES or NO is displayed. If YES,
the node is frozen. When a node is frozen, the master cannot change the role
of this node even if events require it. If NO, the node
is not frozen.
-
excluded
-
YES or NO is displayed. If YES,
the node is excluded from the cluster. An excluded node acts as if it has
the CMM_OUT_OF_CLUSTER role. If NO,
the node is not excluded.
-
eligible
-
YES or NO is displayed. If YES,
this node can participate in an election and be elected master if it is sufficiently
qualified. If NO, this node cannot participate in an
election.
-
incarn
-
The incarnation
number of the time that the node was last booted. The value is an integer
(number of seconds since 00:00 universal coordinated time Jan 1 1970 ) and
a literal representation of this date. For example, 1005833787 (15/11/2001
- 15:16:27).
-
swload_id
-
This
string indicates the Foundation Services software version. The string 1
is displayed for the Foundation Services.
-
CGTP @
-
This is
the address of the node of the cgtp0 interface
You must log in as superuser to use the so, reload, and squalif commands of the nhcmmstat tool.
This section contains examples of how to use the nhcmmstat tool:
Example 1. To Get Information About the Master Node
Example 2. To Get the nodeid of the Current Node
-
Log in to a peer node.
This node becomes the current node.
-
Type:
# nhcmmstat -c local
An output similar to the following is displayed:
Local Node id is 10
In this example the nodeid of the current
node is 10.
You can also find the nodeid of a node by
using the ifconfig command. The nodeid
corresponds to the host part of the nodes IP address. For more information,
see the ifconfig(1m) man page.
Example 3. To Get Information About a Specific Node
Example 4. To Force the Qualification of a Node Asynchronously
-
Log in to a master-eligible node.
-
Type:
# nhcmmstat -c squalif
-
The nhcmmstat and squalif
tool forces the requalification of the current node to make it the master
node. This function can only be successful when there is no active master
node in the cluster and the current node is a master-eligible node.
The squalif tool is asynchronous. The tool is not
blocked while qualification is taking place.
Example 5. To Get Information About All Peer Nodes
Example 6. To Trigger a Switchover
-
Log in to the master node.
-
Type:
# nhcmmstat -c so
An output similar to the following is displayed:
[USER CB] master elected = 10
------------------------------
node_id = 10
domain_id = 250
name = netraMEN1-cgtp0
role = MASTER
qualified = YES
synchro. = NEEDED !!!
frozen = NO
excluded = NO
eligible = YES
incarn. = 1008266390 (13/12/2001 - 18:59:50)
swload_id = 1
CGTP @ = 10.250.3.10
------------------------------
[USER CB] vicemaster elected = 20
------------------------------
node_id = 20 [This is the current node]
domain_id = 250
name = netraMEN2-cgtp0
role = VICE-MASTER
qualified = YES
synchro. = NEEDED !!!
frozen = NO
excluded = NO
eligible = YES
incarn. = 1008266566 (13/12/2001 - 19:02:46)
swload_id = 1
CGTP @ = 10.250.3.20
------------------------------
If there is a vice-master qualified to become master, it is elected
master, the master becomes the vice-master, and the disks are synchronized.
If there is no potential master, nhcmmstat does not perform
a switchover.
See attributes(5)
for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Architecture | SPARC |
Availability | SUNWnhcmb |
Interface Stability | Evolving |
Intro(3CMM), nhcmmd(1M), cluster_nodes_table(4), and nhinstall(1M).
Netra HAS FS 2.1 | Go To Top | Last Changed September 2004 |
Company Info
|
Contact
|
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
|