Network Deployment (Distributed operating systems), v8.0 > Reference > Jython script library


Cluster query scripts

The scripting library provides multiple script procedures to automate the application server configurations. Use the scripts in this topic to determine if clusters and cluster members exist and to display the clusters and cluster members that are configured in the environment. We can run each script individually, or combine procedures to create custom automation scripts.

The AdminClusterManagement script procedures are located in...

WAS_HOME/scriptLibraries/server/V70

Use the following script procedures to query your cluster configuration:



checkIfClusterExists

Display whether the cluster of interest exists in the configuration.

checkIfClusterExists argument description. Run the script to see if the cluster exists.

Argument Description
clusterName Name of the cluster of interest.

Syntax

AdminClusterManagement.checkIfClusterExists(clusterName)

Example usage

AdminClusterManagement.checkIfClusterExists("myCluster")



checkIfClusterMemberExists

Display whether a specific cluster member exists in your cluster configuration.

checkIfClusterMemberExists argument descriptions. Run the script to see if the cluster member exists.

Argument Description
clusterName Name of the cluster to query.
serverName Name of the server of interest.

Syntax

AdminClusterManagement.checkIfClusterMemberExists(clusterName, serverName)

Example usage

AdminClusterManagement.checkIfClusterMemberExists("myCluster", "myClusterMember")



help

Display the script procedures that the AdminClusterManagement script library supports.

help argument description. Run the script to display detailed help for the script. Specify the name of the script.

Argument Description
script Name of the script of interest.

Syntax

AdminResources.help(script)

Example usage

AdminResources.help("createClusterWithoutMember")


listClusters

Display each cluster that exists in the configuration. This script does not require arguments.

Syntax

AdminClusterManagement.listClusters()

Example usage

AdminClusterManagement.listClusters()


listClusterMembers

Display the server cluster members that exist in a specific cluster configuration.

listClusterMembers argument description. Run the script to list the cluster members.

Argument Description
clusterName Name of the cluster of interest.

Syntax

AdminClusterManagement.listClusterMembers(clusterName)

Example usage

AdminClusterManagement.listClusterMembers("myCluster")


Use the script library to automate the application serving environment using wsadmin.sh
Automate server administration using wsadmin.sh
Cluster servers with wsadmin scripting
Balancing workloads


Related


Cluster configuration scripts

+

Search Tips   |   Advanced Search