コア・グループ・メンバーごとに、 固有の HAManagerService 構成オブジェクトがあります。この構成オブジェクトの使用可能属性により、 対応するプロセスに対して HA マネージャーを使用可能にするか使用不可にするかが決定されます。 使用可能属性が true に設定されている場合、HA マネージャーは使用可能です。 使用可能属性が false に設定されている場合、HA マネージャーは使用不可です。 デフォルトでは、HA マネージャーは使用可能になっています。使用可能属性の設定値を変更した場合、 変更を有効にするには、対応するプロセスを再始動する必要があります。 HA マネージャーを使用不可または使用可能にするには、wsadmin ツールを使用する必要があります。
##################################################################### # Script name = disableHamOnProcess.pty ##################################################################### def getHAMServiceOnAll(): # get a list of all HAManagerService objects in the cell. processes = AdminConfig.list("HAManagerService").split("¥n") rc = [] for p in processes: p = p.strip() rc.append(p) return rc # The HAManagerService ObjectName has the following format #cells/cellname/nodes/nodename/servers/servname:hamanagerservice.xml def getNodeName(service): # The 4th /-separated element in the service name is the node name n = service.split("/")[3] return n def getProcessName(service): # The 6th /-separated element in the service name is the process name p = service.split("/")[5] return p.split("|")[0] def printHelp(): print "This script disables the HA Manager on a specific process" print "Format is disableHamOnProcess nodeName processName" ################################## # main ################################# if(len(sys.argv) > 1): # get node name and process name from the command line nodeName = sys.argv[0] processName = sys.argv[1] # get a list of all HAManagerService objects in the cell. processes = getHAMServiceOnAll() for p in processes: # debug print "Checking process "+p # Check for a node name match. n = getNodeName(p) if (nodeName == n): # node name matches, check for server name match pn = getProcessName(p) if (pn == processName): # both node and process names match. Found the one we # are looking for. Disable and exit. print "Disabling the HA Manager on process ", print p AdminConfig.modify(p, [["enable", "false"]]) AdminConfig.save() break else: printHelp()
WebSphere Application Server で使用されるリソース (CPU およびメモリーなど) の量を削減する場合、 およびコア・グループ内の一部またはすべてのプロセスにおいて HA マネージャーが不要だと判断した場合、HA マネージャーを使用不可にすることができます。
高可用性が必要なコア・グループ・メンバーにアプリケーションをインストールするため、 使用不可にされていた HA マネージャーを使用可能にすることが必要な場合があります。
HA マネージャーを使用不可にする、 または使用不可にされていた HA マネージャーを使用可能にするには、wsadmin ツールを使用する必要があります。