Commands for the ServerManagement group of the AdminTask object

Use the Jython sor Jacl scripting languages to manage servers with the wsadmin tool. The commands and parameters in the ServerManagement group can be used to create and manage application servers and server configurations.

For more information about the AdminTask object, see the Commands for the AdminTask object article.

The following commands are available for the ServerManagement group of the AdminTask object:

Command name:

Description: Target object: Parameters and return values: Examples:

createApplicationServer

Use the createApplicationServer command to create a new application server. Node name (optional)

  • Parameters:

    - name

    The name of the server that you want to create. (String)

    - templateName

    The name of the template from which to base the server. (String)

    - genUniquePorts

    Specifies that unique ports should be created for the server. (boolean)

    - templateLocation

    The location of a template. (ObjectName)

  • Returns: The configuration ID of the server you created.

Batch mode example usage:

  • Using Jacl

    $AdminTask createApplicationServer ndnode1 
    {-name test1 –templateName default}
    

  • Using Jython string

    AdminTask.createApplicationServer(ndnode1, 
    '[-name test1 -templateName default]’)
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask createApplicationServer {-interactive}
    

  • Using Jython string

    AdminTask.createApplicationServer ('[-interactive]')
    

createApplicationServerTemplate

The createApplicationServerTemplate command creates a new application server template. None

  • Parameters:

    - templateName

    The name of the application server template that you want to create. (String)

    - serverName

    The name of the server from which to base the template. (String)

    - nodeName

    The node that corresponds to the server from which to base the template. (String)

    - description

    The description of the template. (String)

    - templateLocation

    The location where you want to place the template. (String)

  • Returns: The configuration ID of a new template.

Batch mode example usage:

  • Using Jacl

    $AdminTask createApplicationServerTemplate 
    {-templateName newTemplate -serverName server1 -nodeName 
    ndnode1 -description "This is my new template"}
    

  • Using Jython string

    AdminTask.createApplicationServerTemplate('[-templateName 
    newTemplate -serverName server1 -nodeName ndnode1 
    -description "This is my new template"]')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask createApplicationServerTemplate {-interactive}
    

  • Using Jython string

    AdminTask.createApplicationServerTemplate ('[-interactive]')
    

createGenericServer

Use the createGenericServer command to create a new generic server in the configuration. A generic server is a server that the WebSphere Application Server manages, but did not supply. The createGenericServer command provides an additional step, ConfigProcDef, that use to configure the parameters that are specific to generic servers. None

  • Parameters:

    - name

    The name of the server that you want to create.

    - templateName

    Picks up a server template. This step provides a list of application server templates for the node and server type. The default value is the default templates for the server type. (String, optional)

    - genUniquePorts

    The port for the server.

    - templateLocation

    The location of the server template.

    - startCommand

    Indicates the path to the command that will run when this generic server is started. (String, optional)

    - startCommandArgs

    Indicates the arguments to pass to the startCommand when the generic server is started. (String, optional)

Batch mode example usage:

  • Using Jacl

    $AdminTask createGenericServer jim667BaseNode 
    {-name jgeneric -ConfigProcDef 
    {{"/usr/bin/myStartCommand" "arg1 arg2" "" "" "/tmp/workingDirectory"
     "/tmp/stopCommand" "argy argz"}}}
    

  • Using Jython string

    AdminTask.createGenericServer('jim667BaseNode', 
    '[-name jgeneric -ConfigProcDef [[/usr/bin/myStartCommand "arg1 
    arg2" "" "" /tmp/workingDirectory /tmp/StopCommand "argy argz"]]]')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask createGenericServer {-interactive}
    

  • Using Jython string

    AdminTask.createGenericServer  ('[-interactive]')
    

     

- executableTargetKind

Specifies whether a Java class name (use JAVA_CLASS) or the name of an executable JAR file (use EXECUTABLE_JAR) will be used as the executable target for this process. This field should be left blank for binary executables. This parameter is only applicable for Java processes. (String optional)

- executableTarget

Name of the executable target (a Java class containing a main() method or the name of an executable JAR), depending on the executable target type. This field should be left blank for binary executables. This parameter is only applicable for Java processes. (String, optional)

- workingDirectory

working directory for the generic server.

- stopCommand

Indicates the path to the command that will run when this generic server is stopped. (String, optional)

- stopCommandArgs

Indicates the arguments to pass to the stopCommand parameter when the generic server is stopped. (String, optional)

  • Returns: None

 

createWebServer

Use the createWebServer command to create a Web server definition. This command is a two-step process. The first step creates a Web server definition using a template. The parameters of the second step configure the Web server definition properties. Web server definitions generate and propagate the plugin-config.xml file for each Web server. For IBM HTTP Server only, use the Web server definitions allow you to administer and configure IBM HTTP Server Web servers using the administrative console. These functions include: Start, Stop, View logs, View and Edit configuration files. None

  • Parameters for step one:

    nodeName

    The name of the node. (String, required)

    name

    The name of the server. (String, required)

    templateName

    The name of the template that you want to use. Templates include the following: IHS, iPlanet, IIS, DOMINO, APACHE. The default template is IHS. (String, required)

    genUniquePorts

    Indicates that you want to generate unique ports. (optional)

  • Parameters for step two:

    serverConfig

    Create the Web server. (String, required)

    webPort

    The port for the Web server. (String, required)

    configurationFile

    The configuration file. The default is the path relative to the installation root, for example, conf/httpd.conf. (String, optional)

    webInstallRoot

    The installation path for the Web server. (String, required)

    pluginInstallRoot

    The plug-in installation path. (String, required)

    serviceName

    The service name. (String, optional)

    errorLogfile

    The error log for viewing. The default is the path relative to the installation root, for example, logs/error_log. (String, optional)

Batch mode example usage:

  • Using Jacl

    $AdminTask createWebServer  {-name web1
    -serverConfig 
    {{webPort WebserverInstallRoot PluginInstallRoot 
    Configuration_file_name Windows_Server_Name errorLogPath 
    accessLogPath WebProtocol}}
    -remoteServerConfig {{AdminPort UserID Password AdminProtocol}}
    

  • Using Jython string

    AdminTask.createWebServer('[-name web1 -serverConfig 
    [[webPort WebserverInstallRoot PluginInstallRoot 
    Configuration_file_name Windows_Server_Name 
    errorLogPath accessLogPath WebProtocol]] -remoteServerConfig 
    [[AdminPort UserID Password AdminProtocol]]]')
    
    

    where -serverConfig is second step of the command.

    • WebPort - is the port for the Webserver (required for all webservers)

    • WebserverInstallRoot - is the install path (directory) for webserver. necessary for IBM HTTP Server Admin Function.

    • Plugin Install Root - is install root where the plugin for the webserver is installed. Necessary for all webservers.

    • Configuration file name - is the file path for the IBM HTTP Server. This is necessary for View and edit of the IBM HTTP Server Configuration file only.

    • Windows Service Name - The windows service name on which IBM HTTP Server is to be started. This is necessary for Start and stop of the IBM HTTP Server Web server only.

    • ErrorLogPath - This is the path for the IBM HTTP Server error log (error.log)

     

accessLogfile

The access log for viewing. The default is the path relative to the installation root, for example, logs/access_log. (String, optional)

webProtocol

Parameters for the IBM HTTP Server administration server running with an unmanaged or remote Web server. Options include HTTP or HTTPS. The default is HTTP. (String, required)

adminPort

The port of the IBM HTTP Server administrative server. (String, required)

adminUserID

The user ID. This value should match the one for authentication in the admin.conf. (String, required)

adminPasswrd

The administrative password. (String, required)

adminProtocol

The administrative protocol title. Options include HTTP or HTTPS. The default is HTTP. (String, required)

  • AccessLogPath - This is the path for the IBM HTTP Server access log (access.log)

  • WebServerProtocol - HTTP or HTTPS

where -remoteServerConfig is 3rd step of the command

These parameters are only necessary if the IBM HTTP Server Web server is installed on a machine remote from WebSphere.

  • Admin Server Port - This is the port for the ADministration server. The administration server is installed on the same machine as the IBM HTTP Server. The administrative server handles administrative requests to the IBM HTTP Server Web server.

  • UserID - This is the userID for authentication, if authentication is activated on the Administration server in the admin configuration file (admin.conf).

  • Passwd - This is the password for the specified authentication UserID. The password is generated by htpasswd utility in the admin.passwd file.

  • Admin ServerProtocol - HTTP or HTTPS

Interactive mode example usage:

  • Using Jacl

    $AdminTask createWebServer -interactive
    

  • Using Jython string

    AdminTask.createWebServer ('[-interactive]')
    

     

  • Parameters for step three:

    Parameters for IBM HTTP Server administration server running with an unmanaged or remote Web server (installed on machine different from WebSphere Application Server)

    adminPortTitle (adminPort)

    Port of IBM HTTP Server administration

    adminUserIDTitle (adminUserID)

    The user ID. This value should match the authentication in the admin.conf file.

    adminPasswdTitle (adminPasswd)

    password

    AdminProtocolTitle (adminProtocol)

    This parameter is required. The value is either HTTP or HTTPS. The default value is HTTP.

  • Returns: None

 

deleteServer

Use the deleteServer command to delete a server.

None

  • Parameters:

    -serverName

    The name of the server to delete. (String, required)

    -nodeName

    The name of the node for the server that you want to delete. (String, required)

  • Returns: None

Batch mode example usage:

  • Using Jacl

    $AdminTask deleteServer {-serverName servername 
    -nodeName node}
    

  • Using Jython string

    AdminTask.deleteServer('[-serverName servername 
    -nodeName node]')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask deleteServer {-interactive}
    

  • Using Jython string

    AdminTask.deleteServer ('[-interactive]')
    

deleteServerTemplate

Use the deleteServerTemplate command to delete a server template. You cannot delete templates that are defined by the system. You can only delete server templates that you created. This command deletes the directory that hosts the server template.

The name of the template to delete. (ObjectName, required)

  • Parameters:

  • Returns: None

Batch mode example usage:

  • Using Jacl

    $AdminTask deleteServerTemplate template_name(templates/serverTypes
    /APPLICATION_SERVER/servers/newTemplate|server.xml#Server_1105015708079)
    

  • Using Jython string

    AdminTask.deleteServerTemplate('template_name(templates/serverTypes/
    APPLICATION_SERVER/servers/newTemplate|server.xml#Server_1105015708079)')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask deleteServerTemplate {-interactive}
    

  • Using Jython string

    AdminTask.deleteServerTemplate ('[-interactive]')
    

         
         

getServerType

The getServerType command returns the type of the server that you specify. None

  • Parameters:

    - serverName

    The name of the server. (String)

    - nodeName

    The name of the node. (String)

  • Returns: The type of the server.

Batch mode example usage:

  • Using Jacl

    $AdminTask getServerType {-serverName test2 -nodeName ndnode1}
    

  • Using Jython string

    AdminTask.getServerType('[-serverName test2 -nodeName ndnode1]')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask getServerType {-interactive}
    

  • Using Jython string

    AdminTask.getServerType ('[-interactive]')
    

listServers

The listServers command returns a list of servers. None

  • Parameters:

    serverType

    The type of the server. Used to filter the results. (String)

    nodeName

    The name of the node. Used to filter the results. (String)

  • Returns: A list of configuration IDs for the servers that match the criteria that you specified.

Batch mode example usage:

  • Using Jacl

    $AdminTask listServers {-serverType APPLICATION_SERVER -nodeName ndnode1}
    

  • Using Jython string

    AdminTask.listServers('[-serverType APPLICATION_SERVER -nodeName ndnode1]')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask listServers {-interactive}
    

  • Using Jython string

    AdminTask.listServers ('[-interactive]')
    

listServerTemplates

Use the listServerTemplates command to list server templates.

None

  • Parameters:

    - version

    The version of the template that you want to list. (String, optional)

    - serverType

    Specify this option if you want to list templates for a specific server type. (String, optional)

    - name

    Specify this option to look for a specific template. (String, optional)

    - queryExp

    A key/value pair that use to find templates by properties. For example, com.ibm.websphere.nodeOperatingSystem=os390 (String[], optional)

  • Returns: A list of server template identifications that match with the criteria that you specify with the command parameters. If you do no specify any parameters, all server templates are returned.

Batch mode example usage:

  • Using Jacl

    $AdminTask listServerTemplates {-version 
    6.0.0.0 -serverType APPLICATION_SERVER}
    

  • Using Jython string

    AdminTask.listServerTemplates('[-version 
    6.0.0.0 -serverType APPLICATION_SERVER]')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask listServerTemplates {-interactive}
    

  • Using Jython string

    AdminTask.listServerTemplates ('[-interactive]')
    

listServerTypes

Use the listServerTypes command to display all the current server types. For example, APPLICATION_SERVER, WEB_SERVER, GENERIC_SERVER

The node name for which you want to list the valid types. For example, the types that are only valid on z/OS will appear on a z/OS node. (String, optional)

  • Parameters: None

  • Returns: A list of server types that you can define on a node. If you do not specify the target object, this command returns all of the server types defined in the entire cell.

Batch mode example usage:

  • Using Jacl

    $AdminTask listServerTypes ndnode1
    

  • Using Jython string

    AdminTask.listServerTypes(ndnode1)
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask listServerTypes {-interactive}
    

  • Using Jython string

    AdminTask.listServerTypes ('[-interactive]')
    

         
         
         
         
         
     

- verboseModeGarbageCollection

Specifies whether to use verbose debug output for garbage collection. The default is not to enable verbose garbage collection. (Boolean, optional)

- verboseModeJNI

Specifies whether to use verbose debug output for native method invocation. The default is not to enable verbose Java Native Interface (JNI) activity. (Boolean, optional)

- initialHeapSize

initial heap size in megabytes that is available to the JVM code. (Integer, optional)

- maximumHeapSize

maximum heap size available in megabytes to the JVM code. (Integer, optional)

- runHProf

This parameter only applies to WAS version. It specifies whether to use HProf profiler support. To use another profiler, specify the custom profiler settings using the hprofArguments parameter. The default is not to enable HProf profiler support. (Boolean, optional)

- hprofArguments

This parameter only applies to WAS version. It specifies command-line profiler arguments to pass to the JVM code that starts the application server process. You can specify arguments when HProf profiler support is enabled. (String, optional)

 
     

- debugMode

Specifies whether to run the JVM in debug mode. The default is not to enable debug mode support. (Boolean, optional)

- debugArgs

command line debug arguments to pass to the JVM code that starts the application server process. You can specify arguments when the debug mode is enabled. (String, optional)

- genericJvmArguments

command line arguments to pass to the JVM code that starts the application server process. (String, optional)

- executableJarFileName

Specifies a full path name for an executable JAR file that the JVM code uses. (String, optional)

- disableJIT

Specifies whether to disable the just in time (JIT) compiler option of the JVM code. (Boolean, optional)

- osName

JVM settings for a given operating system. When started, the process uses the JVM settings for the operating system of the node. (String, optional)

  • Returns: None

 
         
         
         
         
         
         

showServerInfo

The showServerInfo command returns the information for a server that you specify. The configuration ID of the server. (required)

  • Parameters: None

  • Returns: A list of metadata.

Batch mode example usage:

  • Using Jacl

    $AdminTask showServerInfo server1(cells/WAS00Network
    /nodes/ndnode1/servers/server1|server.xml)
    

  • Using Jython string

    AdminTask.showServerInfo('server1(cells/WAS00Network
    /nodes/ndnode1/servers/server1|server.xml)')
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask showServerInfo {-interactive}
    

  • Using Jython string

    AdminTask.showServerInfo ('[-interactive]')
    

showServerTypeInfo

The showServerTypeInfo command displays information about a specific server type. A server type. For example: APPLICATION_SERVER (String, required)

  • Parameters:

    - version

    Specify the version of the templates that you want to list. For example, 6.0.0.0. (String, optional)

    - serverType

    Specify this option if you want to list templates for a specific server type. (String, optional)

    - name

    Specify this option to look for a specific template. (String, optional)

    - queryExp

    A key and value pair that use to find templates by properties. For example, com.ibm.websphere.nodeOperatingSystem=os390. (String[], optional)

  • Returns: A list of information about the server type.

Batch mode example usage:

  • Using Jacl

    $AdminTask showServerTypeInfo APPLICATION_SERVER
    

  • Using Jython string

    AdminTask.showServerTypeInfo(APPLICATION_SERVER)
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask showServerTypeInfo {-interactive}
    

  • Using Jython string

    AdminTask.showServerTypeInfo ('[-interactive]')
    

showTemplateInfo

Use the showTemplateInfo command to display the metadata information for a specific server template.

The server type, for example: APPLICATION_SERVER (String, required)

  • Parameters: None

  • Returns: The metadata information regarding a specific template.

Batch mode example usage:

  • Using Jacl

    $AdminTask showTemplateInfo default(templates/
    servertypes/APPLICATION_SERVER/servers/default|server.xml)
    {isSystemTemplate true} {name default} {com.ibm.websphere.baseProductv6.0}
    {description {The WebSphere Default Server Template}} {com.ibm.websphere.baseProductMinorV0.0}
    {com.ibm.websphere.baseProductMajorV6} {com.ibm.websphere.nodeOperatingSystem {}} 
    {isDefaultTemplate true}
    

  • Using Jython string

    AdminTask.showTemplateInfo(default(templates/serverTypes/APPLICATION_SERVER/servers/default|server.xml))
    '[[isSystemTemplate true] [com.ibm.websphere.baseProductv6.0] [name default]
    [com.ibm.websphere.baseProductMinorV0.0] [description The WebSphere Default Server Template]
    [isDefaultTemplate true] [com.ibm.websphere.nodeOperatingSystem] [com.ibm.websphere.baseProductMajorV6]]'
    

Interactive mode example usage:

  • Using Jacl

    $AdminTask showTemplateInfo {-interactive}
    

  • Using Jython string

    AdminTask.showTemplateInfo ('[-interactive]')
    


Related tasks
Using the AdminTask object for scripted administration Related reference
Commands for the AdminTask object

 



 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.