Operating Systems: i5/OS
             Personalize the table of contents and search results

 

ServerManagement command group for the AdminTask object

 

You can use the Jython or 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 server, Web server, proxy server, generic server and JVM configurations. The ServerManagement command group for the AdminTask object includes the following commands:

 

createApplicationServer

Use the createApplicationServer command to create a new application server.

Target object

Specifies the name of the node (String, required)

Required parameters

-name

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

Optional parameters

-templateName

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

-genUniquePorts

Specifies that unique ports should be created for the server. (Boolean, optional)

-templateLocation

The configuration Id that represents the location of a template. Specify the _Websphere_Config_Data_Id=templates/servertypes/APPLICATION_SERV ER|servertype-metadata.xml configuration Id to create an application server. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

createApplicationServerTemplate

The createApplicationServerTemplate command creates a new application server template.

Target object None

Required parameters

-templateName

Specifies the name of the application server template that you want to create. (String, required)

-serverName

Specifies the name of the server from which to base the template. (String, required)

-nodeName

Specifies the node that corresponds to the server from which to base the template. (String, required)

Optional parameters

-description

Specifies the description of the template. (String)

-templateLocation

Specifies a configuration Id that represents the location to place the template. (String)The following example displays the format of the configuration Id, where the display name is optional:

Websphere:_Websphere_Config_Data_Display_Name=display_name,_Websphere_Config_Data_Id=configuration_id
The configuration Id can be one of the following values:

Examples

Batch mode example usage:

Interactive mode example usage:

 

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, used to to configure the parameters that are specific to generic servers.

Target object Specifies the name of the node (String, required)

Required parameters

-name

The name of the server that you want to create.

Optional parameters

-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. (Integer, optional)

-templateLocation

The configuration Id that represents the location of a template. Specify the _Websphere_Config_Data_Id=templates/servertypes/GENERIC_SERVER|servertype-metadata.xml configuration Id to create a generic server. (ObjectName)

-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)

-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

Specifies the 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

Specifies the 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)

Examples

Batch mode example usage:

Interactive mode example usage:

 

createWebServer

Use the createWebServer command to create a Web server definition. This command creates a Web server definition using a template and configures 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, you can 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.

Target object Specifies the name of the node (String, required).

Required parameters

name

Specifies the name of the server. (String, required)

-serverConfig

Specifies the Web server definition properties. Use this parameter and associated options to specify configuration properties for the IBM HTTP Server. Specify the following options within the serverConfig parameter:

-webPort

Port number of the Web server. This option is required for all Web servers. (Integer, required)

-webInstallRoot

Specifies the install path directory for the Web server. This option is required for IBM HTTP Server Admin Function. (String, required)

-pluginInstallRoot

Specifies the installation root directory where the plugin for the Web server is installed. This option is required for all Web servers. (String, required)

-configurationFile

File path for the IBM HTTP Server. This option is required for view and edit of the IBM HTTP Server Configuration file only. (String, required)

-serviceName

Specifies the windows service name on which to start the IBM HTTP Server. This option is required for start and stop of the IBM HTTP Server Web server only. (String, required)

-errorLogfile

Path for the IBM HTTP Server error log (error.log) (String, required)

-accessLogfile

Path for the IBM HTTP Server access log (access.log). (String, required)

-webProtocol

Specifies 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)

-webAppMapping

Specifies configuration information for Web application mapping. (String, required)

-remoteServerConfig

Specifies additional Web server definition properties that are only necessary if the IBM HTTP Server Web server is installed on a machine remote from the application server. Specify the following options within the remoteServerConfig parameter:

-adminPort

Port of the IBM HTTP Server administrative server. The administration server is installed on the same machine as the IBM HTTP Server and handles administrative requests to the IBM HTTP Server Web server. (String, required)

-adminUserID

User ID, if authentication is activated on the Administration server in the admin configuration file (admin.conf). This value should match the authentication in the admin.conf file. (String, optional)

-adminPasswd

Password for the user ID. The password is generated by the htpasswd utility in the admin.passwd file. (String, optional)

-adminProtocol

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

Optional parameters

-templateName

Specifies 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. (Boolean, optional)

-templateLocation

The configuration Id that represents the location of a template. Specify the _Websphere_Config_Data_Id=templates/servertypes/WEB_SERVER|servertype-metadata.xml configuration Id to create a generic server. (ObjectName)

-clusterName

Specifies the cluster of interest. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

deleteServer

Use the deleteServer command to delete a server.

Target object None

Required 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)

Optional parameters

Examples

Batch mode example usage:

Interactive mode example usage:

 

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.

Target object

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

Required parameters

None.

Optional parameters

None.

Examples

Batch mode example usage:

Interactive mode example usage:

 

getJavaHome

Use the getJavaHome command to get the Java home value.

Target object None.

Required parameters

-serverName

Specifies the name of the server. (String, required)

-nodeName

Specifies the name of the node. (String, required)

Examples

Batch mode example usage:

Interactive mode example usage:

 

getJVMMode

Use the getJVMMode command to get information about the mode of the Java virtual machine.

Target object None

Required parameters

-serverName

The name of the server. (String, required)

-nodeName

The name of the node. (String, required)

Examples

Batch mode example usage:

Interactive mode example usage:

 

getServerType

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

Target object None

Optional parameters

-serverName

The name of the server. (String)

-nodeName

The name of the node. (String)

Examples

Batch mode example usage:

Interactive mode example usage:

 

listServers

The listServers command returns a list of servers.

Target object None

Optional parameters

serverType

Timeype of the server. Used to filter the results. (String, optional)

nodeName

Specifies the name of the node. Used to filter the results. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

listServerTemplates

Use the listServerTemplates command to list server templates.

Target object None

Optional 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 and value pair used to to find templates by properties. For example, com.ibm.websphere.nodeOperatingSystem=os390 (String[], optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

listServerTypes

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

Target object

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 and return values

Examples

Batch mode example usage:

Interactive mode example usage:

 

setJVMDebugMode

Use the setJVMDebugMode command to set the JVM debug mode for the application server.

Target object None

Required parameters

-serverName

The name of the server whose JVM properties will be modified. If there is only one server in the configuration, this parameter is optional. (String, required)

-nodeName

The node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

-debugMode

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

Examples

Interactive mode example usage:

 

setGenericJVMArguments

Use the setGenericJVMArguments command passes command line arguments to the JVM code that starts the application server process.

Target object None

Required parameters

-serverName

Specifies the name of the server that contains the JVM properties that are modified. If only one server exists in the configuration, this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

Optional parameters

-genericJvmArguments

Specifies that the command line arguments pass to the Java virtual machine code that starts the application server process. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

setJVMInitialHeapSize

Use the setJVMInitialHeapSize command to set the Java Virtual Machine (JVM) initial heap size for the application server.

Target object

None

Parameters and return values

-serverName

The name of the server whose JVM properties are modified. If there is only one server in the configuration, this parameter is optional. (String, required)

-nodeName

The node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

-initialHeapSize

Specifies the initial heap size available to the JVM code, in megabytes. (Integer, required)

Examples

Interactive mode example usage:

 

setJVMMaxHeapSize

Use the setJVMMaxHeapSize command to set the JVM maximum heap size for the application server.

Target object

None

Parameters and return values

-serverName

The name of the server whose JVM properties are modified. If there is only one server in the configuration, (String, required)

-nodeName

The node name where the server locates. If the server name is unique in the cell, this parameter is optional. (String, required)

-maximumHeapSize

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

Examples

Batch mode example usage:

Interactive mode example usage:

 

setJVMMode

Use the setJVMMode command to set the Java virtual machine mode. The mode can either be 64 bit or 31 bit. Local mode is allowed for disconnected modification of the server. If you use this command to set the mode to 31-bit mode and the server is currently at 64-bit mode with a heap size greater than 2 GB, the heap size will automatically be reduced to original 31 bit heap size value.

Target object

Parameters and return values

-serverName

The name of the server. (String, required)

-nodeName

The name of the node. (String, required)

-mode

The Java virtual machine mode. Valid values include 64bit or 31bit. (String, required)

Examples

Batch mode example usage:

Interactive mode example usage:

 

setJVMProperties

Use the setJVMProperties command to set the JVM configuration for the application server.

Target object None

Required parameters

-serverName

Specifies the name of the server for which the JVM properties will be modified. If there is only one server in the configuration, this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server resides. If the server name is unique in the entire cell, this parameter is optional. (String, required)

Optional parameters

-classpath

Standard class path in which the JVM code looks for classes. (String, optional)

-bootClasspath

Bootstrap classes and resources for JVM code. This option is only available for JVM instructions that support bootstrap classes and resources. You can separate multiple paths by a colon (:) or semi-colon (;), depending on the operating system of the node. (String, optional)

-verboseModeClass

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

-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

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

-maximumHeapSize

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

-runHProf

This parameter only applies to WebSphere Application Server 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 WebSphere Application Server 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

Specifies the 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

Specifies the 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

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

Examples

Batch mode example usage:

Interactive mode example usage:

 

setJVMSystemProperties

Use the setJVMSystemProperties command to set the JVM system property for the process of the application server.

Target object None

Required parameters

-serverName

Specifies the name of the server whose JVM system properties will be set. If there is only one server in the configuration, this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

-propertyName

Property name. (String, required)

-propertyValue

Property value. (String, required)

Examples

Batch mode example usage:

Interactive mode example usage:

 

setProcessDefinition

Use the setProcessDefinition command to set the process definition of an application server.

Target object None

Required parameters

-serverName

The name of the server for which you want to modify the process definition. If there is only one server in the entire configuration, this parameter is optional. (String, required)

-nodeName

The node name where the server resides. If the server name is unique in the entire cell, this parameter is optional. (String, required)

Optional parameters

-executableName

Specifies the executable name that is invoked to start the process. This parameter is only applicable to WebSphere Application Server version. (String, optional)

-executableArguments

Specifies the arguments that are passed to the process when it is started. This parameter is only applicable to WebSphere Application Server version. (String, optional)

-workingDirectory

File system directory that the process uses for the current working directory. (String, optional)

-executableTargetKind

Timeype of the executable target. Valid values include JAVA_CLASS and EXECUTABLE JAR. (String, optional)

-executableTarget

Specifies the name of the executable target. The executable target is a Java class containing a main() method, or the name of an executable JAR file. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

setTraceSpecification

Use the setTraceSpecification command to set the trace specification for the server. If the server is running new trace specification the change takes effect immediately. This command also saves the trace specification in configuration.

Target object None

Required parameters

-serverName

Specifies the name of the server whose trace specification will be set. If there is only one server in the configuration, this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

-traceSpecification

Timerace specification. (String, required)

Examples

Batch mode example usage:

Interactive mode example usage:

 

showJVMProperties

Use the showJVMProperties command to list the JVM configuration for the server of the application process.

Target object None

Required parameters

-serverName

Specifies the name of the Server whose JVM properties are shown. If there is only one server in the entire configuration, then this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server locates. If the server name is unique in the entire cell, then this parameter is optional. (String, required)

-propertyName

If you specify this parameter, the value of this property is returned. If you do not specify this parameter, all JVM properties will return in list format. Each element in the list is a property name and value pair. (String, optional)

Optional parameters

-propertyName

If you specify this parameter, the value of this property is returned. If you do not specify this parameter, all JVM properties will return in list format. Each element in the list is a property name and value pair. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

showJVMSystemProperties

Use the showJVMSystemProperties command to show the Java virtual machine (JVM) system properties for the process of the application server.

Target object None

Required parameters

-serverName

Specifies the name of the server whose JVM properties will be shown. If there is only one server in the configuration, this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

Optional parameters

-propertyName

If you specify this parameter, the value of specified property is returned. If you do not specify this parameter, all properties will return in a list where each element is a property name and value pair. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

showProcessDefinition

Use the showProcessDefinition command to show the process definition of the server.

Target object None

Required parameters

-serverName

Specifies the name of the server for which the process definition is shown. If only one server exists in the configuration, this parameter is optional. (String, required)

-nodeName

Specifies the node name where the server resides. If the server name is unique in the cell, this parameter is optional. (String, required)

Optional parameters

-propertyName

If you do not specify this parameter, all the process definitions of the server are returned in a list format where each element in the list is property name and value pair. If you specify this parameter, the property value of the property name that you specified is returned. (String, optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

showServerInfo

The showServerInfo command returns the information for a server that you specify.

Target object The configuration ID of the server. (required)

Parameters and return values

Examples

Batch mode example usage:

Interactive mode example usage:

 

showServerTypeInfo

The showServerTypeInfo command displays information about a specific server type.

Target object Specifies a server type. For example: APPLICATION_SERVER (String, required)

Optional parameters

-version

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

-serverType

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

-name

Specifies whether to look for a specific template. (String, optional)

-queryExp

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

Examples

Batch mode example usage:

Interactive mode example usage:

 

showTemplateInfo

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

Target object

Specifies the configuration Id of the server type. (String, required)

Parameters and return values

Examples

Batch mode example usage:

Interactive mode example usage:




 

Related tasks


Using the AdminTask object for scripted administration

 

Related Reference


Commands for the AdminTask object

 

Reference topic