Stopping a node using scripting

 

Stopping a node using scripting

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

Stopping the node agent on a remote machine process is an asynchronous action where the stop is initiated, and then control returns to the command line. Perform the following task to stop a node:

  1. Identify the node that you want to stop and assign it to a variable:

    Using Jacl:

    set na [$AdminControl queryNames type=NodeAgent,node=mynode,*]

    Using Jython:

    na = AdminControl.queryNames('type=NodeAgent,node=mynode,*')

  2. Stop the node:

    Using Jacl:

    $AdminControl invoke $na stopNode 

    Using Jython:

    AdminControl.invoke(na, 'stopNode')



Related concepts
AdminControl object for scripted administration

Related reference
Commands for the AdminControl object