+

Search Tips   |   Advanced Search

 

Stop clusters using scripting

 

Use scripting and the wsadmin tool to stop a cluster. Before starting this task, the wsadmin tool must be running. See the Start the wsadmin scripting client article for more information.

 

Overview

Perform the following steps to stop a cluster:

 

Procedure

  1. Identify the Cluster MBean and assign it to the cluster variable.

    • Use Jacl:

      set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
      

    • Use Jython:

      cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*') print cluster
      

    This command returns the Cluster MBean.Example output:

    WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1
    
    

  2. Stop the cluster.

    • Use Jacl:

      $AdminControl invoke $cluster stop
      

    • Use Jython:

      AdminControl.invoke(cluster, 'stop')
      

    This command invokes the stop operation on the Cluster MBean.



Use the AdminControl object for scripted administration
Start clusters using scripting

 

Related Reference


Commands for the AdminControl object