Hi,

Jay SenSharma

Jay SenSharma

Here is a Simple WLST script which can be used to get the Current State of all the applications deployed in a Domain.

Step1). Now open a Command prompt then run “. ./setWLSEnv.sh”
Step2). Run the WLST Script like following:  (below Image has the screenshot of Script)

java weblogic.WLST  application_status.py

The WLST Script is mentioned below which is  simplest and Formated WLST Script … Which doesnt display the Internal WebLogic’s Applications and Makes it more readable and Clean to analyze the state of our Actual Deployed Applications.

Getting Application State using WLST

Getting Application State using WLST

connect('weblogic','weblogic','t3://localhost:7001')
cd ('AppDeployments')
myapps=cmo.getAppDeployments()

for appName in myapps:
	   domainConfig()
	   cd ('/AppDeployments/'+appName.getName()+'/Targets')
	   mytargets = ls(returnMap='true')
	   domainRuntime()
	   cd('AppRuntimeStateRuntime')
	   cd('AppRuntimeStateRuntime')
	   for targetinst in mytargets:
		     curstate4=cmo.getCurrentState(appName.getName(),targetinst)
		     print '-----------', curstate4, '-----------', appName.getName()

.

.

Thanks

Jay SenSharma