WAS v8.5 > Reference > Commands (wsadmin scripting)ManagedObjectMetadata command group for AdminTask
We can use the Jython or Jacl scripting languages to manage servers with wsadmin. The commands and parameters in the ManagedObjectMetadata group can be used to retrieve configuration and metadata information for a specified node.
The ManagedObjectMetadata command group for AdminTask includes the following commands:
- compareNodeVersion
- getAvailableSDKsOnNode
- getMetadataProperties
- getMetadataProperty
- getNodeBaseProductVersion
- getNodeMajorVersion
- getNodeMinorVersion
- getNodePlatformOS
- getNodeSysplexName
- getSDKPropertiesOnNode
- isNodeZOS
compareNodeVersion
The compareNodeVersion command compares the WebSphere Application Server version given a node specified and an input version.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
- -version
- A version number to compare to the WAS version number.
Batch mode example usage
Jacl:
$AdminTask compareNodeVersion {-nodeName node1 -version 5}
Jython string:
AdminTask.compareNodeVersion('[-nodeName node1 -version 5]')
Jython list:
AdminTask.compareNodeVersion(['-nodeName', 'node1', '-version', '5'])
Interactive mode example usage
Jacl:
$AdminTask compareNodeVersion {-interactive}
Jython string:
AdminTask.compareNodeVersion ('[-interactive]')
Jython list:
AdminTask.compareNodeVersion (['-interactive'])
getAvailableSDKsOnNode
Run the getAvailableSDKsOnNode command to return a list of the names of the installed software development kits that a node can use. This command lists the software development kits that have been installed and are available for use by the node.
You might run this command before setting an SDK using the setter commands in the AdminSDKCmds command group. See AdminSDKCmds command group for AdminTask.
Target object
None
Required parameters
- -nodeName
- Name of the node for which you want a list of available software development kits. (String, required)
Optional parameters
None
- Jacl:
$AdminTask getAvailableSDKsOnNode {-nodeName myNode}
- Jython string:
AdminTask.getAvailableSDKsOnNode('[-nodeName myNode]')
- Jython list:
AdminTask.getAvailableSDKsOnNode(['-nodeName', 'myNode'])
Interactive mode example usage
- Jacl:
$AdminTask getAvailableSDKsOnNode {-interactive}
- Using Jython:
AdminTask.getAvailableSDKsOnNode('[-interactive]')
getMetadataProperties
The getMetadataProperties command obtains all metadata for the node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Batch mode example usage
Jacl:
$AdminTask getMetadataProperties {-nodeName node1}
Jython string:
AdminTask.getMetadataProperties('[-nodeName node1]')
Jython list:
AdminTask.getMetadataProperties(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask getMetadataProperties {-interactive}
Jython string:
AdminTask.getMetadataProperties ('[-interactive]')
Jython list:
AdminTask.getMetadataProperties (['-interactive'])
getMetadataProperty
The getMetadataProperty command obtains metadata with the specified key for the node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
- -propertyName
- Metadata property key.
Jacl:
$AdminTask getMetadataProperty {-nodeName node1 -propertyName com.ibm.websphere.baseProductVersion}Jython string:
AdminTask.getMetadataProperty ('[-nodeName node1 -propertyName com.ibm.websphere.baseProductVersion]')Jython list:
AdminTask.getMetadataProperty (['-nodeName', 'node1', '-propertyName', 'com.ibm.websphere.baseProductVersion'])
Interactive mode example usage
Jacl:
$AdminTask getMetadataProperty {-interactive}
Jython string:
AdminTask.getMetadataProperty ('[-interactive]')
Jython list:
AdminTask.getMetadataProperty (['-interactive'])
getNodeBaseProductVersion
The getNodeBaseProductVersion command returns the version of the WAS for a node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Jacl:
$AdminTask getNodeBaseProductVersion {-nodeName node1}
Jython string:
AdminTask.getNodeBaseProductVersion('[-nodeName node1]')
Jython list:
AdminTask.getNodeBaseProductVersion(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask getNodeBaseProductVersion {-interactive}
Jython string:
AdminTask.getNodeBaseProductVersion ('[-interactive]')
Jython list:
AdminTask.getNodeBaseProductVersion (['-interactive'])
getNodeMajorVersion
The getNodeMajorVersion command returns the major version of the WAS for a node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Jacl:
$AdminTask getNodeMajorVersion {-nodeName node1}
Jython string:
AdminTask.getNodeMajorVersion('[-nodeName node1]')
Jython list:
AdminTask.getNodeMajorVersion(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask getNodeMajorVersion {-interactive}
Jython string:
AdminTask.getNodeMajorVersion ('[-interactive]')
Jython list:
AdminTask.getNodeMajorVersion (['-interactive'])
getNodeMinorVersion
The getNodeMinorVersion command returns the minor version of the WAS for a node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Jacl:
$AdminTask getNodeMinorVersion {-nodeName node1}
Jython string:
AdminTask.getNodeMinorVersion('[-nodeName node1]')
Jython list:
AdminTask.getNodeMinorVersion(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask getNodeMinorVersion {-interactive}
Jython string:
AdminTask.getNodeMinorVersion ('[-interactive]')
Jython list:
AdminTask.getNodeMinorVersion (['-interactive'])
getNodePlatformOS
The getNodePlatformOS command returns the operating system name for a node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Jacl:
$AdminTask getNodePlatformOS {-nodeName node1}
Jython string:
AdminTask.getNodePlatformOS('[-nodeName node1]')
Jython list:
AdminTask.getNodePlatformOS(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask getNodePlatformOS {-interactive}
Jython string:
AdminTask.getNodePlatformOS ('[-interactive]')
Jython list:
AdminTask.getNodePlatformOS (['-interactive'])
getNodeSysplexName
The getNodeSysplexName command returns the sysplex name for a node specified.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Jacl:
$AdminTask getNodeSysplexName {-nodeName node1}
Jython string:
AdminTask.getNodeSysplexName('[-nodeName node1]')
Jython list:
AdminTask.getNodeSysplexName(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask getNodeSysplexName {-interactive}
Jython string:
AdminTask.getNodeSysplexName ('[-interactive]')
Jython list:
AdminTask.getNodeSysplexName (['-interactive'])
getSDKPropertiesOnNode
Run the getSDKPropertiesOnNode command to return a list of the software development kit properties for a node. This command lists properties of the software development kits that have been installed and are available for use by the node.
When the -sdkName option is not specified, the command returns all properties for all available software development kits. When the -sdkAttributes option is specified, the command returns only properties for the specified SDK attributes.
You might run this command before setting an SDK using the setter commands in the AdminSDKCmds command group. See AdminSDKCmds command group for AdminTask.
Target object
None
Required parameters
- -nodeName
- Name of the node for which you want a list of installed SDK properties. (String, required)
Optional parameters
- -sdkName
- Name of an SDK whose properties you want returned. (String, optional)
- -sdkAttributes
- List of the SDK attributes whose properties you want returned. (String, optional)
Batch mode example usage
- Jacl:
$AdminTask getSDKPropertiesOnNode {-nodeName myNode}
$AdminTask getSDKPropertiesOnNode {-nodeName myNode -sdkName 1.6_32}
$AdminTask getSDKPropertiesOnNode {-nodeName myNode -sdkAttributes {location}}$AdminTask getSDKPropertiesOnNode {-nodeName myNode -sdkName 1.6_32 -sdkAttributes {location version}}- Jython string:
AdminTask.getSDKPropertiesOnNode('[-nodeName myNode]')
AdminTask.getSDKPropertiesOnNode('[-nodeName myNode -sdkName 1.6_32]')
AdminTask.getSDKPropertiesOnNode('[-nodeName myNode -sdkAttributes [location version]]')AdminTask.getSDKPropertiesOnNode('[-nodeName myNode -sdkName 1.6_32 -sdkAttributes [location version]]')- Jython list:
AdminTask.getSDKPropertiesOnNode(['-nodeName', 'myNode'])
AdminTask.getSDKPropertiesOnNode(['-nodeName', 'myNode','-sdkName', '1.6_32'])AdminTask.getSDKPropertiesOnNode(['-nodeName', 'myNode', '-sdkAttributes', '[location version]'])AdminTask.getSDKPropertiesOnNode(['-nodeName', 'myNode', '-sdkName', '1.6_32', '-sdkAttributes', '[location version]'])
Interactive mode example usage
- Jacl:
$AdminTask getSDKPropertiesOnNode {-interactive}
- Using Jython:
AdminTask.getSDKPropertiesOnNode('[-interactive]')
isNodeZOS
The isNodeZOS command tests if a node specified is running on the z/OS platform. This command does not apply to distributed platforms or to WAS-Express.
Target object
None
Parameters and return values
- -nodeName
- The name of the node associated with the metadata you want this command to return.
Jacl:
$AdminTask isNodeZOS {-nodeName node1}
Jython string:
AdminTask.isNodeZOS('[-nodeName node1]')
Jython list:
AdminTask.isNodeZOS(['-nodeName', 'node1'])
Interactive mode example usage
Jacl:
$AdminTask isNodeZOS {-interactive}
Jython string:
AdminTask.isNodeZOS ('[-interactive]')
Jython list:
AdminTask.isNodeZOS (['-interactive'])
Related
Use the wsadmin scripting AdminTask object for scripted administration
Reference:
AdminSDKCmds command group for AdminTask
Commands for AdminTask using wsadmin.sh