Tuesday, 27 March 2012

Introduction to wsadmin scripting


The WebSphere administrative (wsadmin) scripting program is a powerful, non-graphical command interpreter environment enabling you to run administrative operations in a scripting language.

Let’s begin by looking at the wsadmin “help” (usage) information. Specifying -?, -h, or –help after wsadmin on the command line will cause wsadmin to display its help details, and terminate.

C:\IBM\WebSphere\AppServer\bin>wsadmin -?
WASX7001I: wsadmin is the executable for WebSphere scripting.
Syntax:

wsadmin
        [ -h(elp)  ]
        [ -?  ]
        [ -c <command> ]
        [ -p <properties_file_name>]
        [ -profile <profile_script_name>]
        [ -f <script_file_name>]
        [ -javaoption java_option]
        [ -lang  language]
        [ -wsadmin_classpath  class path]
        [ -profileName profile]
        [ -conntype
                SOAP
                        [-host host_name]
                        [-port port_number]
                        [-user userid]
                        [-password password] |
                RMI
                        [-host host_name]
                        [-port port_number]
                        [-user userid]
                        [-password password] |
                JSR160RMI
                        [-host host_name]
                        [-port port_number]
                        [-user userid]
                        [-password password] |
                IPC
                        [-ipchost host_name]
                        [-port port_number]
                        [-user userid]
                        [-password password] |
                NONE
        ]
        [ -jobid <jobid_string>]
        [ -tracefile <trace_file>]
        [ -appendtrace <true/false>]
        [ script parameters ]

Command
A command to be passed to the script processor.
properties_file_name
A java properties file to be used
profile_script_name
A script file to be run before the main command or file
script_file_name
A command to be passed to the script processor.
java_option
A java standard or non-standard option to be passed to the java program
language
The  language to be used to interpret scripts;  supported values are "jacl"     and    "jython".
-conntype
Specifies the type of connection to be used; the default argument is “SOAP” a conntype of “NONE” means that no server connection is made and certain operations will be performed in local mode.
host_name
Is the host used for the SOAP or RMI connection; the default is the local host.
port_number
the port used for the SOAP or RMI connection
userid
IS the userid required when the server is running in  secure mode
password
IS the password required when the server is running in  secure mode
script parameters
Anything else on the command line. These string values are passed to the script in the sys.argv variable.
jobid_string
A jobID string to be used to audit each invocation of wsadmin.
trace_file
Is the log file name and location where wsadmin trace output is directed.

No comments:

Post a Comment