Photo of the cover of WebSphere Application Server Administration Using Jython

Official companion web site

Brain Dead Short (but useful) Jython Scripts

Most recently modified on 2009-11-04
Available from
Back to home page Back to table of contents page Back to interesting articles page
Display WAS Variables

There are quite a few one line scripts that an administrator can use to obtain useful information about a WebSphere Application Server. Here are some useful one line scripts. To run them, type

wsadmin -lang jython -conntype NONE -c "print ****** "

Replace the ****** above with one of the one line scripts below

(If your deployment manager server is running, you can omit the -conntype NONE)

(If your default language is already set to Jython, you can omit the -lang jython)

script description
AdminTask.reportConfiguredPorts() Lists every server in your cell. Shows all the ports each server uses
AdminTask.reportConfigInconsistencies() Checks the configuation repository and reports any structural inconsistencies
AdminApp.list() Lists every application installed in your cell
AdminApp.view( 'appName' ) Replace appName with one of the names returned by AdminApp.list(). The name must be surrounded by quotes
AdminTask.generateSecConfigReport() Shows every setting related to security in your entire cell. Shows the current value of the setting. Shows the menu path through the Admin Console to that setting. The printout is a little confusing at first, but it is very useful once you get used to reading it.
AdminTask.createApplicationServer('DemoN01', '[-name classroom ]')

Creates a new application server called "classroom" in a node called "DemoN01"

The node must already exist and must already be federated into your cell.

Arthur Kevin McGrath


The author is an engineer with the consulting firm, Contract Engineers. He has consulted and lectured extensively since 1987 about the infrastructure that makes electronic commerce possible. His publications include Leading Practices for WebSphere Dynamic Process Edition V6.2 (SG24-7776-00) and Websphere Application Server Administration Using Jython (ISBN 0137009526), the definitive book on WAS scripting.

Photo of the author
Click here to schedule a speaker at your location
Click here to inquire about consulting for your company
Click here to inquire about training for your company