Obtaining online help using wsadmin scripting

You can select from three levels of online help for administrative commands.

Before you begin

Start the wsadmin tool.

About this task

The top-level help provides general information for the AdminTask object and associated commands. The second-level help provides information about all of the available administrative commands and command groups. The third-level help provides specific help on a command group, a command, or a step. Command group-specific help provides descriptions for the command group that you specify and the commands that belong to the associated group. Command-specific help provides description for the specified command, and associated parameters and steps. Step-specific help provides a description for the specified step and the associated parameters. For command and step-specific help, required parameters are marked with an asterisk (*) in the help output.

Procedure

  • To obtain general help, run the help command.
    Using Jacl:
    $AdminTask help
    Using Jython:
    print AdminTask.help()
    Example output:
    WASX8001I: The AdminTask object enables the execution of available admin
               commands. AdminTask commands operate in two modes:
               the default mode is one which AdminTask communicates with the WebSphere
               server to accomplish its task. A local mode is also available, in which
               no server communication takes place. The local mode of operation is
               invoked by bringing up the scripting client using the command line
               "-conntype NONE" option or setting the
               "com.ibm.ws.scripting.connectiontype=NONE" property in
               wsadmin.properties file.
    
    The number of admin commands varies and depends on your WebSphere install. 
    Use the following help commands to obtain a list of supported commands 
    and their parameters:
    
    help -commands                  Lists all the admin commands
    help -commands <pattern>        Lists admin commands matching with wildcard
                                    "pattern"
    help -commandGroups             Lists all the admin command groups
    help -commandGroups <pattern>   Lists admin command groups matching with
                                    wildcard "pattern"
    help commandName                Displays detailed information for the
                                    specified command
    help commandName stepName       Displays detailed information for the specified
                                    step belonging to the specified command
    help commandGroupName           Displays detailed information for the specified
                                    command group
    
    There are various flavors to invoke an admin command:
    
    commandName                     Invokes an admin command that does not require
                                    any argument.
    
    commandName targetObject        Invokes an admin command with the specified
                                    target object string, for example, the
                                    configuration object name of a resource
                                    adapter. The expected target object varies
                                    with the admin command invoked. Use help
                                    command to get information on the target
                                    object of an admin command.
    
    commandName options             Invokes an admin command with the specified
                                    option strings. This invocation syntax is
                                    used to invoke an admin command that does
                                    not require a target object. It is also
                                    used to enter interactive mode if
                                    "-interactive" mode is included in the
                                    options string.
    
    commandName targetObject options  Invokes an admin command with the specified
                                    target object and options strings.  If
                                    "-interactive" is included in the options string,
                                    then interactive mode is entered.  The target
                                    object and options strings vary depending on the
                                    admin command invoked. Use help command to get 
                                    information on the target object and options.
  • To list the available command groups, run the help command with the -commandGroups parameter.
    Using Jacl:
    $AdminTask help -commandGroups
    Using Jython:
    print AdminTask.help('-commandGroups')
    Example output:
    WASX8005I: Available admin command groups:
    
    AdminAgentNode - Admin Agent Managed Node related tasks
    AdminAgentSecurityCommands - Commands used to configure security related items during Admin Agent registration.
    AdminReports - Admin configuration reports
    AdminSDKCmds - Admin commands related to pluggable SDKs
    AdministrativeJobs - This command group contains all the job management commands
    .
    AppManagementCommands - Application management commands.
    ...
  • To list the available commands, run the help command with the -commands parameter.
    Using Jacl:
    $AdminTask help -commands
    Using Jython:
    print AdminTask.help('-commands')
    Example output:
    WASX8004I: Available administrative commands:
    
    copyResourceAdapter - copy the specified J2C resource adapter to the specified scope
    createCluster - Creates a new application server cluster.
    createClusterMember - Creates a new member of an application server cluster.
    createJ2CConnectionFactory - Create a J2C connection factory
    deleteCluster - Delete the configuration of an application server cluster.
    deleteClusterMember - Deletes a member from an application server cluster.
    listConnectionFactoryInterfaces - list all of the 
    defined connection factory interfaces on the 
    specified J2C resource adapter.
    listJ2CConnectionFactories - List J2C connection factories that have a specified 
    connection factory interface defined in the specified J2C resouce adapter
    createJ2CAdminObject - Create a J2C administrative object.
    listAdminObjectInterfaces - List all the defined administrative object interfaces 
    on the specified J2C resource adapter. 
    interface on the specified J2C resource adapter.
    listJ2CAdminObjects - List the J2C administrative objects that have a specified 
    administrative object interface defined in the specified J2C resource adapter.
    createJ2CActivationSpec - Create a J2C activation specification.
    listMessageListenerTypes - list all of the defined messageListener 
    type on the specified J2C resource adapter.
    listJ2CActivationSpecs - List the J2C activation specifications that have a 
    specified message listener type defined in the specified J2C resource adapter.
  • To obtain help about a command group, run the help command with the group name.
    Using Jacl:
    $AdminTask help JCAManagement
    Using Jython:
    print AdminTask.help('JCAManagement')
    Example output:
    WASX8007I: Detailed help for command group: JCAManagement
    
    Description: A group of administrative commands that help to 
    configure Java 2 Connector Architecture (J2C)-related resources.
    
    Commands:
    createJ2CConnectionFactory - Create a J2C connection factory
    listConnectionFactoryInterfaces - list all of the defined connection 
    factory interfaces on the specified J2C resource adapter.
    listJ2CConnectionFactories - List J2C connection factories that have 
    a specified connection factory interface defined in the 
    specified J2C resouce adapter. 
    createJ2CAdminObject - Create a J2C administrative object.
    listAdminObjectInterfaces - List all the defined administrative 
    object interfaces on the specified J2C resource adapter.
    listJ2CAdminObjects - List the J2C administrative objects that have a 
    specified administrative object interface defined in the 
    specified J2C resource adapter.
    createJ2CActivationSpec - Create a J2C activation specification.
    listMessageListenerTypes - list all of the defined 
    message listener types on the specified J2C resource adapter.
    listJ2CActivationSpecs - List the J2C activation specifications that 
    have a specified message listener type defined in the 
    specified J2C resource adapter. 
    copyResourceAdapter - copy the specified J2C resource 
    adapter to the specified scope.
  • To obtain help about an administrative command, run the help command with the parameter name.
    Using Jacl:
    $AdminTask help createJ2CConnectionFactory
    Using Jython:
    print AdminTask.help('createJ2CConnectionFactory')
    Example output:
    WASX8006I: Detailed help for command: createJ2CConnectionFactory
    
    Description: Create a J2C connection factory
    
    *Target object: The parent J2C resource adapter of the created J2C connection factory.
    
    Arguments:
    *connectionFactoryInterface - A connection factory interface that is defined in the deployment 
    		description of the parent J2C resource adapter.
    *name - The name of the J2C connection factory.
    *jndiName - The JNDI name of the created J2C connection factory.
    description - The description for the created J2C connection factory.
    authDataAlias - the authentication data alias of the created J2C connection factory.
    
    Steps:
    None
    
    In the command-specific help output that is previously listed, an administrative command is divided into three input areas: target object, arguments, and steps. Each area can require input depending on the administrative command. If an area requires input, each input is described by its name and a description; except for the target object area, which contains the description of the target object only. When you use an administrative command in batch mode, you can use any input name that resides in the argument area as the argument name.
    If an input is required, an asterisk (*) is located before the name. If an area does not require an input, it is marked None. The following example uses the help output for the createJ2CConnectionFactory command:
    • The target object area requires the configuration object name of a J2CResourceAdapter.
    • In the arguments area, there are five inputs with three being required inputs. The argument names are connectionFactoryInterface, name, jndiName, description, and authDataAlias. These names are used as the parameter names in the option string to run an administrative command in batch mode, for example:
      -connectionFactoryInterface javax.resource.cci.ConnectionFactory -name newConnectionFactory 
      -jndiName CF/newConnectionFactory
      See Administrative command invocation syntax using wsadmin scripting for more information about specifying argument options.
    • No step is associated with this administrative command.
  • To obtain help on a command step, use the step-specific help.
    Step-specific help provides the following data:
    • A description for the command step.
    • Information indicating if this step supports collection. A collection includes objects of the same type. In a command step, a collection contains objects that have the same set of parameters.
    • Information regarding each step parameter with its name and description. If a step parameter is required, an asterisk (*) is located in front of the name.

    The following example obtains help on a command step:

    Using Jacl:
    $AdminTask help createCluster clusterConfig
    Using Jython:
    print AdminTask.help('createCluster', 'clusterConfig')
    Example output:
    WASX8013I: Detailed help for step: clusterConfig
    
    Description: Specifies the configuration of the new server cluster.
    
    Collection: No
    
    Arguments:
      *clusterName - Name of server cluster.
      preferLocal - Enables node-scoped routing optimization for the cluster.
    
    This example indicates the following information about the clusterConfig step:
    • This step does not support collection. Only one set of parameter values for the clusterName and perferLocal parameters is supported.
    • This step contains two input arguments with one argument that is indicated as required. The required arguments is clusterName and the non-required parameter is preferLocal. The syntax to provide step parameter values is different from the command argument values. You have to provide all argument values of a step and provide them in the exact order as displayed in the step specific help. For any optional argument that you do not want to specify a value, put double quotes ("") in place of a value. If a command step is a collection type, for example, it can contain multiple objects where each object has the same set of arguments, you can specify multiple objects with each object enclosed by its own pair of braces. To run an administrative command in batch mode and to include this step in the option string, use the following syntax:

      Using Jacl:

      -clusterConfig {{newCluster false}}

      Using Jython:

      -clusterConfig [[newCluster false]]
      See Administrative command invocation syntax using wsadmin scripting for more information about specifying parameter options.
  • Use a wildcard character to search for help for a specific command.

    You can use a regular Java expression pattern or a wildcard pattern to specify command name for AdminTask.help('-commands') and AdminConfig list, types, and listTemplates functions.

    • To use a regular Java expression pattern to search for the administrative command names that start with create, specify:
      print AdminTask.help("-commands", "create.*")
    • To use a wildcard search pattern to search for the administrative command names that start with create, specify:
      print AdminTask.help("-commands", "create*")
    • To use a Java expression pattern to search for the administrative command names that contain SSLConfig, specify:
      print AdminTask.help("-commands", ".*SSLConfig.*")
    • To use a wildcard search pattern to search for the administrative command names that contain SSLConfig, specify:
      print AdminTask.help("-commands", "*SSLConfig*")