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 topic about starting the wsadmin scripting client using wsadmin scripting 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 $server serverVersion
    • Using Jython:
      print AdminControl.getAttribute(server, 'serverVersion')



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 6:15:55 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-dist&topic=txml_information
File name: txml_information.html