Stop clusters using scripting

 

Procedure

  1. Start wsadmin

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

    • Jacl

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

    • 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
    
    

  3. Stop the cluster.

    • Jacl

      $AdminControl invoke $cluster stop
      

    • Jython

      AdminControl.invoke(cluster, 'stop')
      

    This command invokes the stop operation on the Cluster MBean.


 

See Also


AdminControl object for scripted administration

 

Related Tasks


Starting a cluster using scripting

 

See Also


Commands for the AdminControl object