Monday, January 4, 2010

Using the versionInfo and historyInfo commands

If you are an administrator of the WebSphere Application Server product, or if you use it frequently during the course of your job, chances are you are familiar with the versionInfo command. In short, you can run this command to get information about the installed version of the server product. The output is similar to the following:

Report at date and time January 4, 2010 12:04:52 PM CST

Installation
---------------------------------------------------------------------
Product Directory C:\was70\as
Version Directory C:\was70\as\properties\version
DTD Directory C:\was70\as\properties\version\dtd
Log Directory C:\was70\as\logs
Backup Directory C:\was70\as\properties\version\nif\backup
TMP Directory C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp

Product List
---------------------------------------------------------------------
CEA installed
ND installed

Installed Product
---------------------------------------------------------------------
Name CEA Feature Pack
Version 1.0.0.1
ID CEA
Build Level a0944.10
Build Date 11/6/09
Architecture Intel (32 bit)

Installed Product
---------------------------------------------------------------------
Name IBM WebSphere Application Server - ND
Version 7.0.0.7
ID ND
Build Level cf070942.55
Build Date 10/24/09
Architecture Intel (32 bit)
---------------------------------------------------------------------
End Installation Status Report
---------------------------------------------------------------------

From the above, I can tell that I have the WebSphere Application Server ND product installed along with the WebSphere CEA Feature Pack.

That's handy in a lot of situations, but what if I want more detail. In particular, what if I want to know about maintenance packages that I have applied to this install? The versionInfo command can provide me this information if I run it with certain options (thanks Johannes, see the comments below), but there is also another command that will give you this information: historyInfo.

The historyInfo command examines the WebSphere Application Server configuration and provides a list of changed components and uninstalled/installed maintenance packages. Here's a small snippet of output from the command:

Installation Event
---------------------------------------------------------------------
Maintenance Package ID 7.0.0.7-WS-WAS-IFPK93786
Action install
Package Filename 7.0.0.7-WS-WAS-IFPK93786.pak
Backup File Name C:\was70\as\properties\version\nif\backup\7.0.0.7-WS-WA
S-IFPK93786.pak
Timestamp 2010-01-04 07:57:46-0600
Result success

Component Installation Event
---------------------------------------------------------------------
Maintenance Package ID 7.0.0.7-WS-WAS-IFPK93786
Component Name was.rt.bundle
Action install
Update Action replace
Timestamp 2010-01-04 07:57:46-0600
Result success

As you can see above, output from the historyInfo command shows me information about an interim fix that was applied, and it shows me the components, in this case the was.rt.bundle component, that were changed as the result of the fix application. Though you can get this same level of detail with certain flavors of the versionInfo command, I thought I'd point out another option as well. For more information about using the historyInfo command check out this entry in the WAS information center.

2 comments:

Johannes said...

try using 'versionInfo.sh -maintenancePackages'. with that you also get the fixes with versionInfo

Dustin Amrhein said...

Of course you are absolutely right about the 'versionInfo -maintenancePackages'. You can also use 'versionInfo -maintenancePackageDetail' and get the same component level information about maintenance packages that historyInfo gives you. The historyInfo command is just another way to grab the info.