Date Created: Fri 30-Nov-2007

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


JACL to show Clusters in a WebSphere Cell

Created by Steve Robinson



show_clusters.jacl

#This script assumes that you have only one cell to administer
#Can be upgraded to cycle through a list of cells, but for SPOT not necessary yet.

set cellName [$AdminControl getCell]
puts "cell name: $cellName"

#set cells [$AdminConfig list Cell]
#puts " Number of cells: [llength $cells]"

set clusters [$AdminConfig list ServerCluster]
puts " Number of ServerClusters in $cellName: [llength $clusters]"

foreach cluster $clusters {

set clname [$AdminConfig showAttribute $cluster name]

set clusterObject [$AdminControl completeObjectName type=Cluster,name=$clname,*]
set status [$AdminControl getAttribute $clusterObject state]
puts "cluster $clname: $status"


set memberlist [$AdminConfig showAttribute $cluster members]
set members [lindex $memberlist 0]
puts " Cluster $clname has [llength $members] members"
foreach member $members {
set mname [$AdminConfig showAttribute $member memberName]
#set weight [$AdminConfig showAttribute $member weight]
#puts " Member $mname has weight $weight"
#puts " Member: $mname"

}
}

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


  • Linked In
  • Twitter
  • About Me
  • My Blog
  • Contact Me

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories