WAS v8.5 > Reference > Jython script library

Server query scripts

The scripting library provides script procedures to automate your server configurations. This topic provides usage information for scripts that query the application server configuration. We can run each script individually, or combine procedures to create custom automation scripts for the environment.

All server management script procedures are located in the app_server_root/scriptLibraries/servers/V70 directory. Use the following script procedures to query the application server configuration:


checkIfServerExists

This script determines whether the server of interest exists in your configuration. To run the script, specify the node name and server name arguments, as defined in the following table:

checkIfServerExists argument descriptions. Run the script to see if a server exists.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.

Syntax

Example usage


checkIfServerTemplateExists

This script determines whether the server template of interest exists in your configuration. To run the script, specify the template name arguments, as defined in the following table:

checkIfServerTemplateExists argument descriptions. Run the script to see if a template exists.

Argument Description
templateName Name of the server template of interest.

Syntax

Example usage


getJavaHome

This script displays the Java home value. To run the script, specify the node name and server name arguments, as defined in the following table:

getJavaHome argument descriptions. Run the script to see the Java home value.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.

Syntax

Example usage


getServerProcessType

This script displays the type of server process for a specific server. To run the script, specify the node and server name arguments for the server of interest, as defined in the following table:

getServerProcessType argument descriptions. Run the script to see the type of server process.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.

Syntax

Example usage


getServerPID

This script displays the running server process ID for a specific target. To run the script, specify the node and server name arguments for the server of interest, as defined in the following table:

getServerPID argument descriptions. Run the script to see a running server process ID.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.

Syntax

Example usage


help

This script displays the script procedures the AdminServerManagement script library supports. To display detailed help for a specific script, specify the name of the script of interest, as defined in the following table:

help argument description. Run the script to see help.

Argument Description
scriptName Name of the script of interest.

Syntax

Example usage


listJVMProperties

This script displays the properties associated with your JVM configuration. To run the script, specify the node name, server name, and optionally the JVM property of interest, as defined in the following table:

listJVMProperties argument descriptions. Run the script to see JVM properties.

Argument Description
nodeName Optionally specifies the name of the node of interest.
serverName Optionally specifies the name of the server of interest.
JVMProperty Optionally specifies the JVM property to query.

Syntax

Example usage


listServers

This script displays the servers that exist in your configuration. We can optionally specify the node name or server type to query for a specific scope, as defined in the following table:

listServers argument descriptions. Run the script to see what servers exist.

Argument Description
serverType Name of the server to query.
nodeName Name of the node to query.

Syntax

Example usage


listServerTemplates

This script displays the server templates in your configuration. To run the script, specify the template version, server type, and template name, as defined in the following table:

listServerTemplates argument descriptions. Run the script to see what templates exists.

Argument Description
templateVersion Optionally specifies the version of the template of interest.
serverType Optionally specifies the type of server. Valid values include the GENERIC_SERVER, WEB_SERVER, APPLICATION_SERVER , and PROXY_SERVER server types.
templateName Optionally specifies the name of the template of interest.

Syntax

Example usage


listServerTypes

This script displays the server types available on the node of interest. To run the script, specify the node name, as defined in the following table:

listServerTypes argument descriptions. Run the script to see the server types.

Argument Description
nodeName Optionally specifies the name of the node of interest.

Syntax

Example usage


queryMBeans

This script queries the application server for Managed Beans (MBeans). Enhance the operation of an application server by defining command-line information for starting or initializing the application server process. Process definition settings define runtime properties such as the program to run, arguments to run the program, and the working directory.

queryMBeans argument descriptions. Run the script with the node name and server name arguments.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.
mbeanType Type of MBean to query.

Syntax

Example usage


showServerInfo

This script displays server configuration properties for the server of interest. The script displays the cell name, server type, product version, node name, and server name.

showServerInfo argument descriptions. Run the script with the node name and server name arguments.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.

Syntax

Example usage


viewProductInformation

This script displays the application server product version.

Syntax

Example usage


Related


Use the script library to automate the application serving environment using wsadmin.sh
Automating application configurations using wsadmin.sh


Reference:

Server settings configuration scripts
Server configuration scripts


+

Search Tips   |   Advanced Search