Date Created: Fri 30-Nov-2007

Related Document Categories:


    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"

    }
    }

Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

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

Oracle WebLogic Categories

JBoss Categories

Other Categories