Server query scripts
All server management script procedures are located in...
WAS_HOME/scriptLibraries/servers/V70You can query the appserver configuration using...
- checkIfServerExists
- checkIfServerTemplateExists
- getJava Home
- getServerProcessType
- getServerPID
- help
- listJVMProperties
- listServers
- listServerTemplates
- listServerTypes
- queryingMBeans
- showServerInfo
- viewingProductInformation
checkIfServerExists
Determine whether the server of interest exists in the configuration. To run the script, specify the node name and server name arguments...
Argument Description nodeName Node of interest. serverName Server of interest.
Syntax
AdminServerManagement.checkIfServerExists(nodeName, serverName)Example usage
AdminServerManagement.checkIfServerExists("Michael-DellNode01", "server1")
checkIfServerTemplateExists
Determine whether the server template of interest exists in the configuration. To run the script, specify the template name arguments...
Argument Description templateName Server template of interest.
Syntax
AdminServerManagement.checkIfServerTemplateExists(templateName)Example usage
AdminServerManagement.checkIfServerTemplateExists("newServer")
getJava Home
Display the Java home value. To run the script, specify the node name and server name arguments, as defined in the following table:
Argument Description nodeName Node of interest. serverName Server of interest. Syntax
AdminServerManagement.getJava Home(nodeName, serverName)Example usage
AdminServerManagement.getJava Home("Michael-DellNode01", "server1")
getServerProcessType
Display 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:
Argument Description nodeName Node of interest. serverName Server of interest.
Syntax
AdminServerManagement.getServerProcessType(nodeName, serverName)Example usage
AdminServerManagement.getServerProcessType("Michael-DellNode01", "server1")
getServerPID
Display 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:
Argument Description nodeName Node of interest. serverName Server of interest. Syntax
AdminServerManagement.getServerPID(nodeName, serverName)Example usage
AdminServerManagement.getServerPID("Michael-DellNode01", "server1")
help
Display the script procedures that 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:
Argument Description scriptName Script of interest. Syntax
AdminServerManagement.help(scriptName)Example usage
AdminServerManagement.help("getServerProcessType")
listJVMProperties
Display the properties that are associated with the 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:
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
AdminServerManagement.listJVMProperties(nodeName, serverName, JVMProperty)Example usage
AdminServerManagement.listJVMProperties("Michael-DellNode01", "server1", "")
listServers
Display the servers that exist in the configuration. We can optionally specify the node name or server type to query for a specific scope, as defined in the following table:
Argument Description serverType Server to query. nodeName Node to query. Syntax
AdminServerManagement.listServers(serverType, nodeName)Example usage
AdminServerManagement.listServers("APPLICATION_SERVER", "Michael-DellNode01")
listServerTemplates
Display the server templates in the configuration. To run the script, specify the template version, server type, and template name, as defined in the following table:
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
AdminServerManagement.listServerTemplates(templateVersion, serverType, templateName)Example usage
AdminServerManagement.listServerTemplates("", "APPLICATION_SERVER", "default")
listServerTypes
Display the server types that are available on the node of interest. To run the script, specify the node name, as defined in the following table:
Argument Description nodeName Optionally specifies the name of the node of interest.
Syntax
AdminServerManagement.listServerTypes(nodeName)Example usage
AdminServerManagement.listServerTypes("Michael-DellNode01")
queryingMBeans
Query the appserver for Managed Beans (MBeans). Enhance the operation of an appserver by defining command-line information for starting or initializing the appserver process. Process definition settings define runtime properties such as the program to run, arguments to run the program, and the working directory.
To run the script, specify the node name and server name arguments...
Argument Description nodeName Node of interest. serverName Server of interest. mbeanType Type of MBean to query.
Syntax
AdminServerManagement.queryingMBeans(nodeName, serverName, mbeanType)Example usage
AdminServerManagement.queryingMBeans("Michael-DellNode01", "server1", "Server")
showServerInfo
Display server configuration properties for the server of interest. The script displays the cell name, server type, product version, node name, and server name.
To run the script, specify the node name and server name arguments...
Argument Description nodeName Node of interest. serverName Server of interest.
Syntax
AdminServerManagement.showServerInfo(nodeName, serverName)Example usage
AdminServerManagement.showServerInfo("Michael-DellNode01", "server1")
viewingProductInformation
Display appserver product version.
Syntax
AdminServerManagement.viewingProductInformation()Example usage
AdminServerManagement.viewingProductInformation()
Related tasks
Use the script library to automate the application serving environment
Automating application configurations using the scripting library
Related
Server settings configuration scripts
Server configuration scripts