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


Node administration scripts

The scripting library provides multiple script procedures to automate your server configurations. This topic provides usage information for scripts that query, configure, and manage your node configurations. We can run each script individually, or combine procedures to create custom automation scripts for the environment.

All node management script procedures are located in...

WAS_HOME/scriptLibraries/system/V70
Use the following script procedures to query, configure, and manage your node configurations:



configureDiscoveryProtocolOnNode

Configure the discovery protocol for the node of interest. If the discovery protocol that a node uses is not appropriate for the node, modify the configuration to use the appropriate protocol.

To run the script, specify the node of interest and the protocol, as defined in the following table:

configureDiscoveryProtocolOnNode argument descriptions. Run the script to configure nodes.

Argument Description
nodeName Name of the node. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.
discoveryProtocol Protocol that the node follows to retrieve information from a network. The Discovery protocol setting is only valid for managed nodes. Specify Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). UDP is faster than TCP, but TCP is more reliable than UDP because UDP does not guarantee delivery of datagrams to the destination. Between these two protocols, the TCP default is recommended.

Syntax

AdminNodeManagement.configureDiscoveryProtocolOnNode(nodeName, discoveryProtocol)

Example usage

AdminNodeManagement.configureDiscoveryProtocolOnNode("myNode", "UDP")


doesNodeExist

Display a value of 1 if the node of interest exists, or a value of -1 if the node of interest does not exist.

To run the script, specify the name of the node, as defined in the following table:

doesNodeExist argument description. Run the script to see if a node exists.

Argument Description
nodeName Name of the node to query. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.

Syntax

AdminNodeManagement.doesNodeExist("nodeName")

Example usage

AdminNodeManagement.doesNodeExist("myNode")


isNodeRunning

Display a value of 1 if the specified node is running, or a value of -1 if the specified node of is not running.

To run the script, specify the name of the node, as defined in the following table:

isNodeRunning argument description. Run the script to see if a node is running.

Argument Description
nodeName Name of the node of interest. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.

Syntax

AdminNodeManagement.isNodeRunning(nodeName)

Example usage

AdminNodeManagement.isNodeRunning("myNode")


listNodes

Display a list of nodes in the environment.

Syntax

AdminNodeManagement.listNodes()

Example usage

AdminNodeManagement.listNodes()


restartActiveNodes

This script restarts the nodes in the environment with node agents that are in the started state.

Syntax

AdminNodeManagement.restartActiveNodes()

Example usage

AdminNodeManagement.restartActiveNodes()


restartNodeAgent

This script restarts the node agent of interest. Node agents are admin agents that monitor application servers on a host system and route administrative requests to servers. A node agent is the running server that represents a node in a WAS ND environment.

To run the script, specify the node of interest, as defined in the following table:

restartNodeAgent argument description. Run the script to restart node agents.

Argument Description
nodeName Name of the node to restart. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.

Syntax

AdminNodeManagement.restartNodeAgent(nodeName)

Example usage

AdminNodeManagement.restartNodeAgent("myNode")


stopNode

This script stops the specified node. This script is requires that the dmgr and the specified node are running. Typically, an HTTP server must also be running.

The following table describes the arguments to specify for this script.

stopNode argument description. Run the script to stop nodes.

Argument Description
nodeName Name of the node to stop. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.

Syntax

AdminNodeManagement.stopNode(nodeName)

Example usage

AdminNodeManagement.stopNode("myNode")


stopNodeAgent

This script stops the node agent of interest. Node agents are admin agents that monitor application servers on a host system and route administrative requests to servers. A node agent is the running server that represents a node in a WAS ND environment.

To run the script, specify the node of interest, as defined in the following table:

stopNodeAgent argument description. Run the script to stop node agents.

Argument Description
nodeName Name of the node. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.

Syntax

AdminNodeManagement.stopNodeAgent(nodeName)

Example usage

AdminNodeManagement.stopNodeAgent("myNode")


syncActiveNodes

This script propagates configuration changes to each active node in the environment. By default, this situation occurs periodically, as long as the node can communicate with the dmgr.

Syntax

AdminNodeManagement.syncActiveNodes()

Example usage

AdminNodeManagement.syncActiveNodes()


syncNode

This script propagates configuration changes to the node of interest. By default, this situation occurs periodically, as long as the node can communicate with the dmgr.

To run the script, specify the node of interest, as defined in the following table:

syncNode argument description. Run the script to synchronize nodes.

Argument Description
nodeName Name of the node. The node name is unique within the cell. A node name usually is identical to the host name for the computer. That is, a node usually corresponds to a physical computer system with a distinct IP host address.

Syntax

AdminNodeManagement.syncNode(nodeName)

Example usage

AdminNodeManagement.syncNode("myNode")

Use the script library to automate the application serving environment using wsadmin.sh


Related


Server settings configuration scripts
Node group configuration scripts

+

Search Tips   |   Advanced Search