• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

script or tool for info websphere configurations

Hi,

To build a central information base for our network I'ld like to find a way to retrieve information from websphere applications, servers and dmgrs.

I want to be able to retrieve portnumbers, connectornames, quenames, etc, etc, etc,  . A bit like generating documentation I guess.

Does anyone know if a tool exists which can handle this? If not, can I script this via the commandlines and shellscripts (examples maybe?  ) ?


Our Websphere servers run on IBM AIX .
I am not familiair with Python or Jython, so these are not an option for me.


0
ehout
Asked:
ehout
  • 3
  • 2
1 Solution
 
hu8myphoCommented:
Checkout IBM Support Assistant tool.  There are agents that you can install that will collect and provide the information that you are looking for as well as a plethora of other very useful admin tools.

http://www-01.ibm.com/software/support/isa/isa40/tools.html
0
 
HonorGodCommented:
What kind of information is it that you need?

To obtain information about the version of product installed:

versionInfo.[bat|sh]

To get details about the install & update history for the installation:

historyInfo.[bat|sh]

To get the install & update history as an HTML file:

genHistoryReport.[bat|sh]

To display more specific configuration information, you may need to get access to the configuration details using some wsadmin scripts:

WebSphere Application Server (6.1) documentation:
- http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp

Scripting the application serving environment (wsadmin)
- http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/welc6topscripting.html

For example, a script to display the configured ports might look something like:

To use it, the command line would look something like:

wsadmin -conntype none -lang jython -profileName Dmgr01 -f ..\scripts\Ports.py
import AdminConfig
 
def showAsDict( configID ) :
  'Return a dictionary of the AdminConfig.show( configID ) result.'
  result = {}
  try :
    #-----------------------------------------------------------------
    # The result of the AdminConfig.show() should be a string
    # containing many lines.  Each line of which starts and ends
    # with brackets.  The "name" portion should be separated from the
    # associated value by a space.
    #-----------------------------------------------------------------
    for item in AdminConfig.show( configID ).splitlines() :
      if ( item[ 0 ] == '[' ) and ( item[ -1 ] == ']' ) :
        ( key, value ) = item[ 1:-1 ].split( ' ', 1 )
        result[ key ] = value
  except NameError, e :
    print 'Name not found: ' + str( e )
  except :
    ( kind, value ) = sys.exc_info()[ :2 ]
    print 'Exception  type: ' + str( kind )
    print 'Exception value: ' + str( value )
  return result
 
SEs = AdminConfig.list( 'ServerEntry' ).splitlines()
#-----------------------------------------------------------------------------
# for each ServerEntry configuration ID
#-----------------------------------------------------------------------------
for SE in SEs :
  SEname = SE.split( '(', 1 )[ 0 ]   # The name occurs before the '('
  print '''
Server name: %s\n
Port#|EndPoint Name
-----+-------------''' % SEname        # Display the server name & headings
  #---------------------------------------------------------------------------
  # For the given server (SE) get the list of NamedEndPoints
  # Then, for each NamedEndPoint, display the port # and endPointName values
  #---------------------------------------------------------------------------
  NEPs = AdminConfig.list( 'NamedEndPoint', SE ).splitlines()
  for NEP in NEPs :
    NEPdict = showAsDict( NEP )
    EPdict  = showAsDict( NEPdict[ 'endPoint' ] )
    print '%5d|%s' % ( EPdict[ 'port' ], NEPdict[ 'endPointName' ] )

Open in new window

0
 
ehoutAuthor Commented:
Wow...That's a whole lot of info. Thnx.
Have holiday right now, but when back at the office will try this. Especially this portnumber thing would really help us. Would it also work for 6.0 and/or 5.x ?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
HonorGodCommented:
Unfortunately not.

It may work for version 6.0, but Jython as a scripting language isn't supported until version 6.0, and has changed a bit (for the better) from 6.0 -> 6.1

For version 5.x, you would have to use Jacl as a scripting language:

Deploying and managing using scripting (v 5.1)
- http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_script.html
0
 
HonorGodCommented:
Thanks for the grade and points.

Good luck & have a great day.
0
 
ehoutAuthor Commented:
lol... didn't expect it anymore, right? Been away a long time from ee, sorry.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now