Obtaining server version information
Use wsadmin.sh and scripting to obtain server version information.
Before starting this task, wsadmin.sh must be running. See the topic about starting the wsadmin scripting client for more information.
To query the server version information:
- Identify the server and assign it to the server variable.
Jacl:
set server [$AdminControl completeObjectName type=Server,name=server1,node=mynode,*]
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
- 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.
(dist)(zos) 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.
Jacl:
$AdminControl getAttribute $server serverVersion
Jython:
print AdminControl.getAttribute(server, 'serverVersion')
Example output for a WAS 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 Network Deployment Build Date: 9/11/02 Build Level: r0236.11 Version: 5.0.0 --------------------------------------------------------------------------- End Report ---------------------------------------------------------------------------
Related tasks
Use the wsadmin scripting AdminControl object for scripted administration Use wsadmin scripting Get started with wsadmin scripting Start the wsadmin scripting client
Commands for the AdminControl object