Network Deployment (Distributed operating systems), v8.0 > Reference > Commands (wsadmin scripting)
JobManagerNode command group using wsadmin scripting
We can use Jython to manage job manager settings with wsadmin.sh. Use the commands and parameters in the JobManagerNode group to register nodes that do not contain an admin agent with the job manager.
New feature: Use commands and parameters added in v8.0 to the JobManagerNode command group to register targets that do not contain an admin agent with the job manager. The new commands have Target in the command names: cleanupTarget, queryTargets, getTargetProperties, modifyTargetProperties, and getTargetKeys. These commands replace deprecated commands that have ManagedNode in the command names.New feature:
New feature: Deprecated feature: Commands in the JobManagerNode command group that have ManagedNode in the command names and that have been deprecated in WAS v8.0 include cleanupManagedNode, queryManagedNodes, getManagedNodeProperties, modifyManagedNodeProperties, and getManagedNodeKeys. Use commands that have Target in the command names instead.depfeat
Use the following commands to administer and query managed node, target, and resource configurations:
- cleanupManagedNode (deprecated)
- New feature: cleanupTarget
- getContexts
- getManagedNodeKeys (deprecated)
- New feature: getTargetKeys
- getManagedNodeProperties (deprecated)
- New feature: getTargetProperties
- getManagedResourceProperties
- getManagedResourcePropertyKeys
- getManagedResourceTypes
- modifyManagedNodeProperties (deprecated)
- New feature: modifyTargetProperties
- queryManagedNodes (deprecated)
- New feature: queryTargets
- queryManagedResources
- registerHost
- unregisterHost
cleanupManagedNode (deprecated)
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
-managedNodeName
Name of the node of interest. (String, required)
Return valueThe command returns the UUID of the job manager that the system cleaned up.
Batch example...
- Jython string:
AdminTask.cleanupManagedNode('-managedNodeName Node1')
- Use Jython list:
AdminTask.cleanupManagedNode(['-managedNodeName', 'Node1'])
Interactive example...
### Jython
AdminTask.cleanupManagedNode('-interactive')
cleanupTarget New feature:
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
-targetName
Name of the target of interest. (String, required)
Return valueThe command returns the UUID of the job manager that the system cleaned up.
Batch example...
- Jython string:
AdminTask.cleanupTarget('-targetName Target1')
- Use Jython list:
AdminTask.cleanupTarget(['-targetName', 'Target1'])
Interactive example...
### Jython
AdminTask.cleanupTarget('-interactive')
getContexts
The getContexts command displays all contexts in the management model, including nodes and servers.
Target object None
Required parameters None
Return valueThe command returns a list of all context paths.
Batch example...
- Jython string:
AdminTask.getContexts()
- Use Jython list:
AdminTask.getContexts()
Interactive example...
### Jython
AdminTask.getContexts('-interactive')
getManagedNodeKeys (deprecated)
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
-managedNodeName
Name of the node of interest. (String, optional)
Return valueThe command returns a list of the keys.
Batch mode example usage
- Jython string:
AdminTask.getManagedNodeKeys('-managedNodeName Node1')
- Use Jython list:
AdminTask.getManagedNodeKeys(['-managedNodeName', 'Node1'])
Interactive example...
### Jython
AdminTask.getManagedNodeKeys('-interactive')
getTargetKeys New feature:
The getTargetKeys command displays the keys to use to query for targets, including the name, alias, and uuid keys.
Target object None
Optional parameters
-targetName
Name of the target of interest. (String, optional)
Return valueThe command returns a list of the keys.
Batch mode example usage
- Jython string:
AdminTask.getTargetKeys('-targetName Target1')
- Use Jython list:
AdminTask.getTargetKeys(['-targetName', 'Target1'])
Interactive example...
### Jython
AdminTask.getTargetKeys('-interactive')
getManagedNodeProperties (deprecated)
The getManagedNodeProperties command displays the properties for one or more managed or unmanaged nodes.
Target object None
Optional parameters
-managedNodeNameList
Specifies a list of names of the nodes of interest. (String [], optional)
Return valueThe command returns a list of properties for each node specified with the -managedNodeNameList parameter.
Batch mode example usage
- Jython string:
AdminTask.getManagedNodeProperties('-managedNodeNameList "[Node1 Node2]"')
- Use Jython list:
AdminTask.getManagedNodeProperties(['-managedNodeNameList', '[Node1 Node2]'])
Interactive example...
### Jython
AdminTask.getManagedNodeProperties('-interactive')
getTargetProperties New feature:
The getTargetProperties command displays the properties for one or more targets.
Target object None
Optional parameters
-targetNameList
Specifies a list of names of the targets of interest. (String [], optional)
Return valueThe command returns a list of properties for each target specified with the -targetNameList parameter.
Batch mode example usage
- Jython string:
AdminTask.getTargetProperties('-targetNameList "[Target1 Target2]"')
- Use Jython list:
AdminTask.getTargetProperties(['-targetNameList', '[Target1 Target2]'])
Interactive example...
### Jython
AdminTask.getTargetProperties('-interactive')
getManagedResourceProperties
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
-resourceIdList
Specifies a list of unique identifiers for the resources of interest. (String, optional)
Return valueThe command returns a list of properties for each managed resource.
Batch example...
- Jython string:
AdminTask.getManagedResourceProperties('-resourceIdList AppSrv01-BASE-b83dc35c-69d4-40af-af60-127de7002cfb /nodes/myNode/servers/server1')
- Use Jython list:
AdminTask.getManagedResourceProperties('-resourceIdList', 'AppSrv01-BASE-b83dc35c-69d4-40af-af60-127de7002cfb /nodes/myNode/servers/server1')
Interactive example...
### Jython
AdminTask.getManagedResourceProperties('-interactive')
getManagedResourcePropertyKeys
The getManagedResourcePropertyKeys command displays the property keys for a specific type of managed resources.
Target object None
Required parameters
-resourceType
Type of managed resource of interest. (String, required)
Return valueThe command returns a list of managed resource keys for the specific resource type.
Batch example...
- Jython string:
AdminTask.getManagedResourcePropertyKeys('-resourceType server')
- Use Jython list:
AdminTask.getManagedResourcePropertyKeys('-resourceType', 'server')
Interactive example...
### Jython
AdminTask.getManagedResourcePropertyKeys('-interactive')
getManagedResourceTypes
The getManagedResourceTypes command displays each of the managed resource types.
Target object None
Required parameters None
Return valueThe command returns a list of managed resource types.
Batch mode example usage
- Jython string:
AdminTask.getManagedResourceTypes()
- Use Jython list:
AdminTask.getManagedResourceTypes()
Interactive example...
### Jython
AdminTask.getManagedResourceTypes('-interactive')
modifyManagedNodeProperties (deprecated)
The modifyManagedNodeProperties command replaces properties in a managed node configuration. If the managed node has an admin agent, the command only modifies the alias property. If the managed node does not have an admin agent, the command replaces all properties.
Target object None
Required parameters
-managedNodeName
Name of the node of interest. (String, required)
-managedNodeProps
Name and value property pairs to modify for the node of interest. (Properties, required)
Optional parameters
-replace
Whether to replace the existing properties. Specify true to replace the existing properties. Specify false to merge the properties. The default value is false. (Boolean, optional)
Return valueThe command does not return output.
Batch mode example usage
- Jython string:
AdminTask.modifyManagedNodeProperties('-managedNodeName Node1 -managedNodeProps "[alias myNewAlias]"')
- Use Jython list:
AdminTask.modifyManagedNodeProperties('-managedNodeName', 'Node1', '-managedNodeProps', '[alias myNewAlias]')
Interactive example...
### Jython
AdminTask.modifyManagedNodeProperties('-interactive')
modifyTargetProperties New feature:
The modifyTargetProperties command replaces properties in a target configuration. If the target has an admin agent, the command only modifies the alias property. If the target does not have an admin agent, the command replaces all properties.
Target object None
Required parameters
-targetName
Name of the target of interest. (String, required)
-targetProps
Name and value property pairs to modify for the target of interest. (Properties, required)
Optional parameters
-replace
Whether to replace the existing properties. Specify true to replace the existing properties. Specify false to merge the properties. The default value is false. (Boolean, optional)
Return valueThe command does not return output.
Batch mode example usage
- Jython string:
AdminTask.modifyTargetProperties('-targetName Target1 -targetProps "[alias myNewAlias]"')
- Use Jython list:
AdminTask.modifyTargetProperties('-targetName', 'Target1', '-targetProps', '[alias myNewAlias]')
Interactive example...
### Jython
AdminTask.modifyTargetProperties('-interactive')
queryManagedNodes (deprecated)
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
-maxReturn
Maximum number of managed nodes to return. (Integer, required)
Optional parameters
-query
Specifies a query that consists of one or more query expressions separated by spaces. If not specified, the command returns all managed nodes. (String, optional) Construct your queries based on the following guidelines:
- Each query expression consists of the key, operator, and value elements.
- The following operators are supported:
queryManagedNodes -query operators. Use an operator in a query.
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
- We can specify one value or multiple values separated by commas.
- We can use pattern matching to specify the value.
-validate
Whether to validate the search query. (Boolean, optional)
Return valueThe 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 example...
- Jython string:
AdminTask.queryManagedNodes('-maxReturn 20 -query "managedNodeName=Node1" -validate true')
- Use Jython list:
AdminTask.queryManagedNodes(['-maxReturn', '20', '-query', 'managedNodeName=Node1', '-validate', 'true'])
Interactive example...
### Jython
AdminTask.queryManagedNodes('-interactive')
queryTargets New feature:
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
-maxReturn
Maximum number of targets to return. (Integer, required)
Optional parameters
-query
Specifies a query that consists of one or more query expressions separated by spaces. If not specified, the command returns all targets. (String, optional) Construct your queries based on the following guidelines:
- Each query expression consists of the key, operator, and value elements.
- The following operators are supported:
queryTargets -query operators. Use an operator in a query.
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
- We can specify one value or multiple values separated by commas.
- We can use pattern matching to specify the value.
-validate
Whether to validate the search query. (Boolean, optional)
Return valueThe 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 example...
- Jython string:
AdminTask.queryTargets('-maxReturn 20 -query "targetName=target1" -validate true')
- Use Jython list:
AdminTask.queryTargets(['-maxReturn', '20', '-query', 'targetName=target1', '-validate', 'true'])
Interactive example...
### Jython
AdminTask.queryTargets('-interactive')
queryManagedResources
The queryManagedResources command queries your managed resources for specific managed nodes based on a query expression.
Target object None
Required parameters
-maxReturn
Maximum number of managed resources to return. (Integer, required)
Optional parameters
-query
Specifies a query that consists of one or more query expressions separated by spaces. If not specified, the command returns all managed nodes. (String, optional) Construct your queries based on the following guidelines:
- Each query expression consists of the key, operator, and value elements.
- The following operators are supported:
queryManagedResources -query operators. Use an operator in a query.
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
- We can specify one value or multiple values separated by commas.
- We can use pattern matching to specify the value.
-validate
Whether to validate the search query. (Boolean, optional)
Return valueThe 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 example...
- Jython string:
AdminTask.queryManagedResources('-maxReturn 20 -query "alias=managedNode1"')
- Use Jython list:
AdminTask.queryManagedResources('-maxReturn', '20', '-query', '"alias=managedNode1"')
Interactive example...
### Jython
AdminTask.queryManagedResources('-interactive')
registerHost
The registerHost command defines a remote host target to the job manager.
New feature: Use the registerHost command to:
- Register a remote host target with the job manager. Unlike targets that are WAS profiles and are registered using the registerWithJobManager command at the dmgr or admin agent, a remote host target is not required to have any WAS products installed. There are no software requirements for this host beyond its operating system.
- Collect an inventory of the remote host. Information regarding managed resources and job types is available upon successful completion of the registerHost command.
We 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.New feature:
Target object None
Required parameters
-host
Name of the remote computer to register with the job manager. (String, required)
-hostProps
Properties of the host. We can define any properties that you want. The defined properties in the table affect the behavior of the command. (String, required)
registerHost -hostProps defined properties. We can specify one or more defined properties for the registerHost command, or specify undefined properties for the command.
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:
- (AIX) aix
- hpux
- linux
- (Solaris) solaris
- (Windows) windows
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 specify a value for privateKeyFile. passphrase A passphrase for the privateKeyFile, if needed. saveSecurity 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
-imDataLocations
Enter the fully qualified path of the Installation Manager data locations. We can enter multiple paths separated by a semi-colon. This property is useful if we have non-default Installation Manager data locations on your targets. For example, if you specified data locations when installing Installation Manager, CIM's inventory job might not find the non-default data locations. Therefore, you might need to specify additional data locations when registering a host. If an invalid data location is specified, it will not be saved. If the specified data location can be detected by the inventory job, it will not be saved. We can also use the find data location job to search for data locations on the system. The find data location job automatically updates this property. For example: AdminTask.registerHost('[-host hostname -hostProps [ [imDataLocations datalocation1; datalocation2] [password ****] [saveSecurity true] [username username] ]]')
Return valueThe command returns an inventory of the remote host.
Batch example...
- Jython string:
AdminTask.registerHost('-host myHost.acme.com -hostProps [ [osType linux][username root] [privateKeyFile /root/.ssh/id_dsa] [passphrase myPassphrase] [saveSecurity true] ]')
- Use Jython list:
AdminTask.registerHost('-host', 'myHost.acme.com', '-hostProps', '[ [osType linux] [username root] [privateKeyFile /root/.ssh/id_dsa] [passphrase myPassphrase] [saveSecurity true]' ]')
Interactive example...
### Jython
AdminTask.registerHost('-interactive')
unregisterHost
The unregisterHost command removes the remote host from the job manager.
New feature: 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.New feature:
Target object None
Required parameters
-host
Name of the remote computer to unregister from the job manager. (String, required)
Optional parametersNone
Return valueNone
Batch example...
- Jython string:
AdminTask.unregisterHost('-host myHost.acme.com')
- Use Jython list:
AdminTask.unregisterHost('-host', 'myHost.acme.com')
Interactive example...
### Jython
AdminTask.unregisterHost('-interactive')
Administer jobs in a flexible management environment using wsadmin.sh
Register nodes with the job manager using commands
Group nodes in a flexible management environment using wsadmin.sh
Run administrative jobs using wsadmin.sh
Run administrative jobs across multiple nodes using wsadmin.sh
Schedule future administrative jobs using wsadmin.sh
Manage administrative jobs using wsadmin.sh
Related
AdministrativeJobs command group using wsadmin.sh
ManagedNodeGroup command group using wsadmin.sh (deprecated)
ManagedNodeAgent command group using wsadmin.shNew feature: TargetGroup command group using wsadmin.sh