C H A P T E R 7 |
The NmaMasterNametags example, the code of which is listed in Example 7–1, queries the PmdMasterStatisticsMBean for the list of daemon monitor nametags active on the master node. The mechanism used below (the invoke() method of the HTTPConnectorClient class) can be used to invoke the methods of the NMA MBeans and query the NMA for statistics and information.
The Daemon Monitor statistics are useful in maintaining awareness of processes that fail, and processes that are unable to restart within the allowed number of retries. Access to the process IDs (PIDs) of the processes allows for the monitoring of these processes using standard Solaris Operating System commands.
See Daemon Monitor in Netra High Availability Suite 3.0 1/08 Foundation Services Overview for more information about the Daemon Monitoring service.
This section describes the Daemon Monitor statistics available from the NMA on the master node.
This section describes the Daemon Monitor statistics collected by the NMA on each peer node.
The PmdStatisticsMBean provides a list of all the nametags monitored by the Daemon Monitor.
The PmdNameTagStatisticsMBean MBean provides information about the number of attempts that can be made to restart a daemon, and the number of attempts that have already been made. This MBean is the source of:
A NhasPmdMaxRetriesNotification, which is sent whenever the maximum allowed number of retry attempts is exceeded
A AttributeValueChangeNotification, which is sent whenever the number of allowed retry attempts is changed
A NhasPmdNewNameTagNotification, which is sent whenever the Daemon Monitor removes a nametag from the collection
One instance of this MBean is instantiated for each Daemon Monitor by the Daemon Monitor service.
To get the nametag that the PmdNameTagStatisticsMBean MBean is providing data on, invoke the getNameTag method. The getNameTag method takes no parameters, and returns a String.
To get the list of process IDs associated with this nametag, invoke the getPidList method. The getPidList method takes no parameters, and returns an int[].
To get the maximum number of restart retries allowed for this nametag, invoke the getMaxRetryCount method. The getMaxRetryCount method takes no parameters, and returns an int.
Copyright © 2008, Sun Microsystems, Inc. All rights reserved.