You can use the server maintenance mode commands to view or edit the maintenance mode of your servers without using the administrative console. To set maintenance mode on a node, you can use the NodeGroupManager MBean.
The setMaintenanceMode command puts a server into maintenance mode.
Required parameters
Optional parameters
Possible values:
break, affinity, or stop.
Specify break to break Hypertext Transfer Protocol (HTTP) or Session Initiation Protocol (SIP) affinity and keep the server running. Specify affinity to keep HTTP or SIP affinity active and keep the server running. Specify stop to stop the server immediately and put the server in affinity mode.
Default: affinity
Return value
The command returns void.
Batch mode example usage
$AdminTask setMaintenanceMode xdnode1 {-name test1 -mode break}
AdminTask.setMaintenanceMode ('xdnode1','[-name test1 -mode affinity]')
Interactive mode example usage
AdminTask setMaintenanceMode {-interactive}
AdminTask.setMaintenanceMode ('[-interactive]')
The setMaintenanceMode command takes the server out of maintenance mode.
Required parameters
Return value
The command returns void.
Batch mode example usage
$AdminTask unsetMaintenanceMode xdnode1 {-name test1}
AdminTask.unsetMaintenanceMode ('xdnode1','[-name test1]')
Interactive mode example usage
AdminTask unsetMaintenanceMode {-interactive}
AdminTask.unsetMaintenanceMode ('[-interactive]')
The checkMode command checks whether a server is in maintenance mode.
Required parameters
Return value
The command returns a string value that indicates the server mode.
Batch mode example usage
$AdminTask checkMode xdnode1 {-name test1}
AdminTask.checkMode ('xdnode1','[-name test1]')
Interactive mode example usage
AdminTask checkMode {-interactive}
AdminTask.checkMode ('[-interactive]')
You can use the NodeGroupManager MBean to set or unset maintenance mode for a node. See NodeGroupManager MBean for more information.
You can use the following example in wsadmin to set maintenance mode for a node:
set ngmMbean [$AdminControl queryNames WebSphere:*,type=NodeGroupManager,process=dmgr] $AdminControl invoke $ngmMbean setMaintenanceMode {nodeName true true}