WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Obtaining server version information with scripting

Use the wsadmin tool and scripting to obtain server version information.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

Perform the following steps to query the server version information:

Procedure

  1. Identify the server and assign it to the server variable.
    • Using Jacl:
      set server [$AdminControl completeObjectName type=Server,name=server1,node=mynode,*]
    • Using Jython:
      server = AdminControl.completeObjectName('type=Server,name=server1,node=mynode,*')
      print server
    Example output:
    WebSphere:cell=mycell,name=server1,mbeanIdentifier=server.xml#Server_1,
    type=Server,node=mynode,process=server1,processType=ManagedProcess
  2. Query the server version. The server version information is stored in the serverVersion attribute. The getAttribute command returns the attribute value of a single attribute, passing in the attribute name.
    Note: To run the following commands as a non-root user, you must have write permission for the app_server_root/properties/version/ and app_server_root/properties/version/history directories.
    • Using Jacl:
      $AdminControl getAttribute $server1 serverVersion
    • Using Jython:
      print AdminControl.getAttribute(server1, 'serverVersion')
    Example output for a Network Deployment installation follows:
    IBM WebSphere Application Server Version Report
       ---------------------------------------------------------------------------
    
            Platform Information
            ------------------------------------------------------------------------
    
                    Name: IBM WebSphere Application Server
                    Version: 5.0
    
    
            Product Information
            ------------------------------------------------------------------------
    
                    ID: BASE
                    Name: IBM WebSphere Application Server
                    Build Date: 9/11/02
                    Build Level: r0236.11
                    Version: 5.0.0
    
    
            Product Information
            ------------------------------------------------------------------------
    
                    ID: ND
                    Name: IBM WebSphere Application Server for Network Deployment
                    Build Date: 9/11/02
                    Build Level: r0236.11
                    Version: 5.0.0
    
       ---------------------------------------------------------------------------
       End Report
       ---------------------------------------------------------------------------
    
    



Related tasks
Using the AdminControl object for scripted administration
Using scripting (wsadmin)
Getting started with scripting
Related reference
Commands for the AdminControl object
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_information.html

© Copyright IBM Corporation 2004, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)