sun.com | docs.sun.com | How To Buy | My Sun | Worldwide Sites |  |

| Previous Contents Index Next
Chapter 9 # Cluster Membership Manager Statistics This chapter describes the Cluster Membership Manager (CMM) statistics that can be accessed from the NMA. This chapter contains the following sections: Introducing CMM Statistics CMM Master Statistics CMM Node Statistics ## Introducing CMM Statistics The CMM statistics collected by the NMA provide the role and status of each node in the cluster. When a direct link is configured between the master-eligible nodes the NMA can monitor the following statistics: The number of times that the vice-master node has requested to become the master node. The state of the direct link. The state can be up or down. For information about the direct link, see the Netra High Availability Suite Foundation Services 2.1 6/03 Overview. Because it is possible to set a timeout value for CMM operations, it is also possible that CMM operations may not be completed during the time allowed. If the timeout value is too short, some or all CMM operations will fail. For more information about this CMM behavior, see `cmm_connect`(3CMM). ## CMM Master Statistics ### `CmmMasterStatisticsMBean` The `CmmMasterStatisticsMBean` MBean interface makes master state information available. One MBean implementing the `CmmMasterStatisticsMBean` interface is instantiated on the CMM cluster master node. #### Getting the Average Time Between Node Starts To get the average time in seconds between nodes when starting the CMM, invoke the `getAverageElectionDelay` method. This information can be used for tuning the master election mechanism. The `getAverageElectionDelay` method takes no parameters, and returns an `int`. #### Getting the Number of CMM Clients To get the number of CMM clients currently connected, invoke the `getClientCount` method. The `getClientCount` method takes no parameters, and returns an `int`. This information is available on all nodes. #### Getting the CMM Lifetime To get the lifetime of the CMM on this node, expressed in the number of seconds since boot, invoke the `getCmmUpTime` method. The `getCmmUpTime` method takes no parameters, and returns an `int`. This information is available on all nodes. #### Getting the Number of Node Elections To get the number of elections processed on the platform, invoke the `getElectionCount` method. The `getElectionCount` method takes no parameters, and returns an `int`. #### Getting the Longest Interval Between Node Starts To get the maximum time in seconds between nodes when starting the CMM, invoke the `getMaxElectionDelay` method. The `getMaxElectionDelay` method takes no parameters, and returns an `int`. This information can be used for tuning the election mechanism. #### Getting the Shortest Interval Between Node Starts To get the minimum time in seconds between nodes when starting the CMM, invoke the `getMinElectionDelay` method. The `getMinElectionDelay` method takes no parameters, and returns an `int`. This information can be used for tuning the election mechanism. #### Getting the Number of Nodes in the Cluster To get the number of nodes acknowledged by the master node as being present in the cluster, invoke the `getPresentNodeCount` method. The `getPresentNodeCount` method takes no parameters, and returns an `int`. #### Getting the Number of Outstanding CMM Requests To get the number of requests currently outstanding, invoke the `getRequestCount` method. The `getRequestCount` method takes no parameters, and returns an `int`. This information is available on all nodes. #### Getting the Switchover Count To get the number of switchovers performed, invoke the `getSwitchOverCount` method. The `getSwitchOverCount` method takes no parameters, and returns an `int`. ## CMM Node Statistics ### `ClusterNodeMBean` The `ClusterNodeMBean` MBean interface exposes the CMM view of the local node on which the agent runs. This MBean interface makes the CMM state information of the current node available. One MBean implementing the `ClusterNodeMBean` interface is instantiated in each management agent in the cluster. The MBean that implements this interface is the emitter of the `java.com.sun.nhas.ma.cmm.NhasCmmNotification`. #### Getting a Node's CGTP Address To return the CGTP address of a node, invoke the `getCgtpAddress` method. The `getCgtpAddress` method takes no parameters, and returns a `String`. This is not a symbolic name for the node. Having the IP address in dot-notation makes it possible to avoid translation into IP format. #### Getting the Domain ID of the Cluster that a Node is Eligible to Join To return the domain ID of the cluster that a node is eligible to join, invoke the `getDomainId` method. The `getDomainId` method takes no parameters, and returns an `int`. The domain ID identifies the cluster that the node can join. A cluster is composed of nodes that have the same domain ID. Two nodes running incompatible versions of a software package must have different domain IDs. Nodes can only belong to one cluster. The ID of that cluster is the domain ID of the current node as defined in the CMM configuration. Because the CMM is only aware of what occurs in its own cluster, the domain ID field will be the same for all nodes reachable from this node. This information is useful when interpreting CMM debug traces, which will refer to this domain ID when necessary. #### Getting the Time Since Node Was Last Rebooted To return the incarnation number, invoke the `getIncarnationNumber` method. The incarnation number is computed locally by each node. The value of the incarnation number is the time of the last reboot expressed in the number of seconds since epoch (01/01/1970). The `getIncarnationNumber` method takes no parameters, and returns a `long`. #### Getting the CMM Membership Role of a Node To get the membership role of this node, invoke the `getMembershipRole` method. This information is extracted from the `CmmStateFlag`. The `getMembershipRole` method takes no parameters, and returns a `com.sun.nhas.ma.cmm.CmmMembershipRoleEnum`, which is one of the following values:
MASTER | The node is the current cluster master node
VICEMASTER | The node is the current vice-master node
IN_CLUSTER | The node is a regular node in the cluster
OUT_OF_CLUSTER | The node is down
#### Getting the Node ID To return the unique ID that identifies this node within the cluster, invoke the `getNodeId` method. This information is useful when interpreting CMM debug traces, which refer to this ID. The `getNodeId` method takes no parameters, and returns an `int`. #### Getting the Node Name To get a human-readable String that uniquely identifies this node within the cluster, invoke the `getNodeName` method. The name is not intended to be a parameter to be passed to system calls. It is intended to be used to format display messages. For instance, this name could be formatted so as to refer to the position of the card on a shelf so as to make it easy for an operator to locate and replace it in case of failure. The `getNodeName` method takes no parameters, and returns a `String`. #### Getting the Node Boot Image ID To return the ID of the current boot image used by this node, invoke the `getSoftwareLoadId` method. Since CMM is only aware of the domain ID, if two nodes run two incompatible boot images they must have different domain IDs and different software load IDs. The `getSoftwareLoadId` method takes no parameters, and returns a `String`. #### Getting the CMM State Flags of a Node To return the membership state flags of a node, invoke the `getStateFlags` method. These flags are a concatenation of the administrative attributes, the membership roles and the qualification as seen from the CMM's perspective. The `getStateFlags` method takes no parameters, and returns a `CmmStateFlag`. ### `CmmStatisticsMBean` The `CmmStatisticsMBean` MBean provides statistics about the service performed by the CMM. Some of these statistics will only be available on the master node. Others will be available on each node in the cluster. One MBean instance is instantiated for each NMA on the cluster.
Previous Contents Index Next

Copyright 1994-2004 Sun Microsystems