Intelligent Management: maintenance mode administrative tasks
Use the server maintenance mode commands to view or edit the maintenance mode of the servers without using the administrative console. To set maintenance mode on a node, we can use the NodeGroupManager Bean .
Use the following commands to set, disable, and check maintenance mode for the servers:
setMaintenanceMode
The setMaintenanceMode command puts a server into maintenance mode.
Required parameters:
- -name
- Name of the server to put into maintenance mode.
Optional parameters:
- -mode
- Optional parameter. If we do not specify a value, then the default is used.
Possible values:
- false: Disable the maintenance mode.
- break: Stop any traffic from being routed to the server.
- affinity: Default value. Route only traffic with affinity to the server.
- stop: Stop the server, and persistently sets it in break mode.
Return value
The command returns void.
Batch mode example usage
- Use Jacl:
$AdminTask setMaintenanceMode xdnode1 {-name test1 -mode break}- Use Jython string:
AdminTask.setMaintenanceMode ('xdnode1','[-name test1 -mode affinity]')
Interactive mode example usage
- Use Jacl:
AdminTask setMaintenanceMode {-interactive}- Use Jython string:
AdminTask.setMaintenanceMode ('[-interactive]')
unsetMaintenanceMode
The unsetMaintenanceMode command takes the server out of maintenance mode.
Required parameters:
- -name
- Name of the server to take out of maintenance mode.
Return value.
The command returns void.
Batch mode example usage
- Use Jacl:
$AdminTask unsetMaintenanceMode xdnode1 {-name test1}- Use Jython string:
AdminTask.unsetMaintenanceMode ('xdnode1','[-name test1]')
Interactive mode example usage
- Use Jacl:
AdminTask unsetMaintenanceMode {-interactive}- Use Jython string:
AdminTask.unsetMaintenanceMode ('[-interactive]')
checkMode
The checkMode command checks whether a server is in maintenance mode.
Required parameters:
- -name
- Name of the server to check.
Return value.
The command returns a string value that indicates the server mode.
Batch mode example usage
- Use Jacl:
$AdminTask checkMode xdnode1 {-name test1}- Use Jython string:
AdminTask.checkMode ('xdnode1','[-name test1]')
Interactive mode example usage
- Use Jacl:
AdminTask checkMode {-interactive}- Use Jython string:
AdminTask.checkMode ('[-interactive]')
Node maintenance mode
Use the NodeGroupManager MBean to enable or disable maintenance mode for a node.
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}
Related:
Health management Set maintenance mode Create health policies Intelligent Management: health policy administrative tasks NodeGroupManager MBean