Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Manage servers and nodes with scripting
Stop servers using scripting
We can stop servers using scripting and wsadmin.sh.
Restriction: Concurrently stopping servers using Jacl or Jython threading (multiple threads) methods is not supported in WebSphereApplication Server v7.0.
Procedure
Use the stopServer command to stop the server. This command has several syntax options. For example:
- To stop a server on a WAS single server edition, choose one of the following options:
- The following examples specify the server name only:
### Jacl
$AdminControl stopServer serverName### Jython
AdminControl.stopServer('serverName')
- The following examples stop an application server with the node specified:
### Jacl
$AdminControl stopServer serverName mynode### Jython
print AdminControl.stopServer('serverName', 'mynode')
Example output:
WASX7337I: Invoked stop for server "serverName" Waiting for stop completion. WASX7264I: Stop completed for server "serverName" on node "mynode"
- The following examples specify the server name and immediate:
### Jacl
$AdminControl stopServer serverName immediate### Jython
AdminControl.stopServer('serverName', immediate)
To stop a server on a WAS network deployment edition, choose one of the following options:
- The following example specifies the server name and the node name:
### Jacl
$AdminControl stopServer serverName nodeName### Jython
AdminControl.stopServer('serverName', 'nodeName')
The following example specifies the server name, the node name, and immediate:
### Jacl
$AdminControl stopServer serverName nodeName immediate### Jython
AdminControl.stopServer('serverName', 'nodeName', immediate)
Use the wsadmin scripting AdminControl object for scripted administration
Start the wsadmin scripting client using wsadmin.sh
Related
Commands for the AdminControl object using wsadmin.sh
stopServer command