You can use the Jython scripting language to manage job manager settings with the wsadmin tool. Use the commands and parameters in the JobManagerNode group to register targets that do not contain an administrative agent with the job manager.
Use commands that have Target in the command names: cleanupTarget, queryTargets, getTargetProperties, modifyTargetProperties, and getTargetKeys. These commands replace deprecated commands that have ManagedNode in the command names.
The cleanupManagedNode command cleans up registration information for a managed node. If the system fails when removing a node from the job manager, use this command to explicitly clean up the registration information on the job manager. The command does not remove the job history for the node. Jobs in progress continue to run, but new jobs do not start for the node.
Target object
None.
Required parameters
Return value
The command returns the UUID of the job manager that the system cleaned up.
Batch mode example usage
AdminTask.cleanupManagedNode('-managedNodeName Node1')
AdminTask.cleanupManagedNode(['-managedNodeName', 'Node1'])
Interactive mode example usage
AdminTask.cleanupManagedNode('-interactive')
The cleanupTarget command cleans up registration information for a target. If the system fails when removing a target from the job manager, use this command to explicitly clean up the registration information on the job manager. The command does not remove the job history for the target. Jobs in progress continue to run, but new jobs do not start for the target.
Target object
None.
Required parameters
Return value
The command returns the UUID of the job manager that the system cleaned up.
Batch mode example usage
AdminTask.cleanupTarget('-targetName Target1')
AdminTask.cleanupTarget(['-targetName', 'Target1'])
Interactive mode example usage
AdminTask.cleanupTarget('-interactive')
The getContexts command displays all contexts in the management model, including nodes and servers.
Target object
None.
Required parameters
None.
Return value
The command returns a list of all context paths.
Batch mode example usage
AdminTask.getContexts()
AdminTask.getContexts()
Interactive mode example usage
AdminTask.getContexts('-interactive')
The getManagedNodeKeys command displays the keys to use to query for managed nodes, including the name, alias, and uuid keys.
Target object
None.
Optional parameters
Return value
The command returns a list of the keys.
Batch mode example usage
AdminTask.getManagedNodeKeys('-managedNodeName Node1')
AdminTask.getManagedNodeKeys(['-managedNodeName', 'Node1'])
Interactive mode example usage
AdminTask.getManagedNodeKeys('-interactive')
The getTargetKeys command displays the keys to use to query for targets, including the name, alias, and uuid keys.
Target object
None.
Optional parameters
Return value
The command returns a list of the keys.
Batch mode example usage
AdminTask.getTargetKeys('-targetName Target1')
AdminTask.getTargetKeys(['-targetName', 'Target1'])
Interactive mode example usage
AdminTask.getTargetKeys('-interactive')
The getManagedNodeProperties command displays the properties for one or more managed or unmanaged nodes.
Target object
None.
Optional parameters
Return value
The command returns a list of properties for each node specified with the -managedNodeNameList parameter.
Batch mode example usage
AdminTask.getManagedNodeProperties('-managedNodeNameList "[Node1 Node2]"')
AdminTask.getManagedNodeProperties(['-managedNodeNameList', '[Node1 Node2]'])
Interactive mode example usage
AdminTask.getManagedNodeProperties('-interactive')
The getTargetProperties command displays the properties for one or more targets.
Target object
None.
Optional parameters
Return value
The command returns a list of properties for each target specified with the -targetNameList parameter.
Batch mode example usage
AdminTask.getTargetProperties('-targetNameList "[Target1 Target2]"')
AdminTask.getTargetProperties(['-targetNameList', '[Target1 Target2]'])
Interactive mode example usage
AdminTask.getTargetProperties('-interactive')
The getManagedResourceProperties command displays the properties of one or more managed resources. Managed resources are instances within a node context or server context. For example, within a server context you can have the managed resources server1, server2, or server3.
Target object
None.
Required parameters
Return value
The command returns a list of properties for each managed resource.
Batch mode example usage
AdminTask.getManagedResourceProperties('-resourceIdList AppSrv01-BASE-b83dc35c-69d4-40af-af60-127de7002cfb
/nodes/myNode/servers/server1')
AdminTask.getManagedResourceProperties('-resourceIdList', 'AppSrv01-BASE-b83dc35c-69d4-40af-af60-127de7002cfb
/nodes/myNode/servers/server1')
Interactive mode example usage
AdminTask.getManagedResourceProperties('-interactive')
The getManagedResourcePropertyKeys command displays the property keys for a specific type of managed resources.
Target object
None.
Required parameters
Return value
The command returns a list of managed resource keys for the specific resource type.
Batch mode example usage
AdminTask.getManagedResourcePropertyKeys('-resourceType server')
AdminTask.getManagedResourcePropertyKeys('-resourceType', 'server')
Interactive mode example usage
AdminTask.getManagedResourcePropertyKeys('-interactive')
The getManagedResourceTypes command displays each of the managed resource types.
Target object
None.
Required parameters
None.
Return value
The command returns a list of managed resource types.
Batch mode example usage
AdminTask.getManagedResourceTypes()
AdminTask.getManagedResourceTypes()
Interactive mode example usage
AdminTask.getManagedResourceTypes('-interactive')
The modifyManagedNodeProperties command replaces properties in a managed node configuration. If the managed node has an administrative agent, the command only modifies the alias property. If the managed node does not have an administrative agent, the command replaces all properties.
Target object
None.
Required parameters
Optional parameters
Return value
The command does not return output.
Batch mode example usage
AdminTask.modifyManagedNodeProperties('-managedNodeName Node1 -managedNodeProps "[alias myNewAlias]"')
AdminTask.modifyManagedNodeProperties('-managedNodeName', 'Node1', '-managedNodeProps', '[alias myNewAlias]')
Interactive mode example usage
AdminTask.modifyManagedNodeProperties('-interactive')
The modifyTargetProperties command replaces properties in a target configuration. If the target has an administrative agent, the command only modifies the alias property. If the target does not have an administrative agent, the command replaces all properties.
Target object
None.
Required parameters
Optional parameters
Return value
The command does not return output.
Batch mode example usage
AdminTask.modifyTargetProperties('-targetName Target1 -targetProps "[alias myNewAlias]"')
AdminTask.modifyTargetProperties('-targetName', 'Target1', '-targetProps', '[alias myNewAlias]')
Interactive mode example usage
AdminTask.modifyTargetProperties('-interactive')
The queryManagedNodes command searches for managed nodes based on a query expression. If you do not specify a query expression, the command returns all managed nodes.
Target object
None.
Required parameters
Optional parameters
Character | Value |
---|---|
= | Equal to. Specify that the value is null by using = NULL. |
!= | Not equal to. Specify that the value is not null by using != NULL |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
Return value
The command returns the number of matches the query found. Secondly, the command returns a list of the managed nodes that met the search query criterion.
Batch mode example usage
AdminTask.queryManagedNodes('-maxReturn 20 -query "managedNodeName=Node1" -validate true')
AdminTask.queryManagedNodes(['-maxReturn', '20', '-query', 'managedNodeName=Node1', '-validate', 'true'])
Interactive mode example usage
AdminTask.queryManagedNodes('-interactive')
The queryTargets command searches for targets based on a query expression. If you do not specify a query expression, the command returns all targets.
Target object
None.
Required parameters
Optional parameters
Character | Value |
---|---|
= | Equal to. Specify that the value is null by using = NULL. |
!= | Not equal to. Specify that the value is not null by using != NULL |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
Return value
The command returns the number of matches the query found. Secondly, the command returns a list of the targets that met the search query criterion.
Batch mode example usage
AdminTask.queryTargets('-maxReturn 20 -query "targetName=target1" -validate true')
AdminTask.queryTargets(['-maxReturn', '20', '-query', 'targetName=target1', '-validate', 'true'])
Interactive mode example usage
AdminTask.queryTargets('-interactive')
The queryManagedResources command queries your managed resources for specific managed nodes based on a query expression.
Target object
None.
Required parameters
Optional parameters
Character | Value |
---|---|
= | Equal to. Specify that the value is null by using = NULL. |
!= | Not equal to. Specify that the value is not null by using != NULL |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
Return value
The command returns the number of matches the query found. Secondly, the command returns a list of UUIDs of the managed nodes that met the search query criterion.
Batch mode example usage
AdminTask.queryManagedResources('-maxReturn 20 -query "alias=managedNode1"')
AdminTask.queryManagedResources('-maxReturn', '20', '-query', '"alias=managedNode1"')
Interactive mode example usage
AdminTask.queryManagedResources('-interactive')
The registerHost command defines a remote host target to the job manager. Use the registerHost command to:
You can work with remote host targets the same as those that are registered using registerWithJobManager, but the types of jobs available to a remote host target are different.
Target object
None.
Required parameters
Property name | Property description |
---|---|
osType | The operating system type. Specify osType to
enable the command to complete faster. This optional property determines
the means for connecting with the host. Valid values are:
|
username | A user with authority to log in to the host. This property is required. |
password | The password for the given username. A value for password or privateKeyFile must be specified. If the host does not require a password, you can specify a null String value of "". |
privateKeyFile | The path to the private keyfile. If you do not specify a value for password, then you must specify a value for privateKeyFile. |
passphrase | A passphrase for the privateKeyFile, if needed. |
saveSecurity | Specifies whether to store security properties (username, password, privateKeyFile, passphrase) with the host and used as default values for job submissions. If this property is given a value of true, then the security properties are stored with the host and used for subsequent job submissions to this host. |
Optional parameters
AdminTask.registerHost('[-host hostname -hostProps [ [imDataLocations datalocation1; datalocation2]
[password ****] [saveSecurity true] [username username] ]]')
AdminTask.registerHost('-host hostname -hostProps [ [username admin][password password][saveSecurity true]
[WLP_WORKING_DIR C:/working][WLP_SHARED_DIR C:/shared][WLP_ADDITIONAL_DIRS C:/addl] ]')
Return value
The command returns an inventory of the remote host.
Batch mode example usage
AdminTask.registerHost('-host myHost.acme.com -hostProps [ [osType linux][username root]
[privateKeyFile /root/.ssh/id_dsa] [passphrase myPassphrase] [saveSecurity true] ]')
AdminTask.registerHost('-host', 'myHost.acme.com', '-hostProps', '[ [osType linux] [username root]
[privateKeyFile /root/.ssh/id_dsa] [passphrase myPassphrase] [saveSecurity true]' ]')
Interactive mode example usage
AdminTask.registerHost('-interactive')
The unregisterHost command removes the remote host from the job manager. Use the unregisterHost command to unregister a remote host target from the job manager. After a host is unregistered, the job manager cannot run jobs on the target.
Target object
None.
Required parameters
Optional parameters
None
Return value
None
Batch mode example usage
AdminTask.unregisterHost('-host myHost.acme.com')
AdminTask.unregisterHost('-host', 'myHost.acme.com')
Interactive mode example usage
AdminTask.unregisterHost('-interactive')