Many times during our SOA implementation, we could not logged into SOA Console to monitor the state of the servers in the Domain due to different reasons ( huge load, bad Console performance).
It can be easily done by WLST Commands. Properties like ServerState, Server Health,ListenPort, Listen Addresses etc can be easily monitored.
a) There are bunch of commands that needs to be executed to get the details. For simplycity, a jython script can be directly executed.
ServerStatus.py
username = 'weblogic' password = 'PASSWORD' URL='t3://host:port' connect(username,password,URL) domainRuntime() cd('ServerRuntimes') servers=domainRuntimeService.getServerRuntimes() for server in servers: serverName=server.getName(); print '**************************************************' print '############## serverName ###############' print '**************************************************' print '##### Server State #####', server.getState() print '##### Server ListenAddress #####', server.getListenAddress() print '##### Server ListenPort #####', server.getListenPort() print '##### Server Health State #####', server.getHealthState()
b) Execute it
$ORACLE_SOA_HOME/common/bin/wlst.sh ServerStatus.py
c) Sample Output
************************************************** ############## serverName ############### ************************************************** ##### Server State ##### RUNNING ##### Server ListenAddress ##### Server Name/IP ##### Server ListenPort ##### PORT ##### Server Health State ##### Component:ServerRuntime,State:HEALTH_OK,MBean:WLS_WSM1,ReasonCode:[] ************************************************** ############## serverName ############### ************************************************** ##### Server State ##### RUNNING ##### Server ListenAddress ##### Server Name/IP ##### Server ListenPort ##### PORT ##### Server Health State ##### Component:ServerRuntime,State:HEALTH_OK,MBean:AdminServer,ReasonCode:[]
Leave a Reply