wsadmin
Simple examples for using the wsadmin tool
In most cases, run these scripts:
[WebSphere install root]/profiles/[deployment manager profile]/bin/wsadmin.sh -lang [jacl|jython] -conntype soap -port [dmgr SOAP_CONNECTOR_ADDRESS] -f [path/to/script]
Note that wsadmin requires authentication and is otherwise damn slow, so sometimes you end up writing a shell script for parsing raw XML config files...
List server ports (JACL)
List server ports (JACL)
set nodes [$AdminConfig list Node]
foreach node $nodes {
set nodeName [$AdminConfig showAttribute $node "name"]
set serverEntries [$AdminConfig list ServerEntry $node]
foreach serverEntry $serverEntries {
set serverName [$AdminConfig showAttribute $serverEntry "serverName"]
puts ""
puts "Node:$nodeName/Server:$serverName"
set namedEndPoints [$AdminConfig list NamedEndPoint $serverEntry]
foreach namedEndPoint $namedEndPoints {
set endPointName [$AdminConfig showAttribute $namedEndPoint "endPointName"]
set endPoint [$AdminConfig showAttribute $namedEndPoint "endPoint"]
set host [$AdminConfig showAttribute $endPoint "host"]
set port [$AdminConfig showAttribute $endPoint "port"]
puts "$endPointName: $host:$port"
}
}
}
Possible source here (Mark Lewis).