Created
March 29, 2018 06:54
-
-
Save AKSarav/7eacd218ef9e53297be61e20d87165be to your computer and use it in GitHub Desktop.
AppStatus.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect('weblogic','weblogic1','t3://localhost:17001') | |
myapps=cmo.getAppDeployments() | |
outputbuffer=[] | |
outputbuffer.append("--"*40) | |
outputbuffer.append(" \t\t\tAPPLICATION STATUS WEBLOGIC\t\t") | |
outputbuffer.append("--"*40) | |
outputbuffer.append (" %-50s%20s" %("APPLICATION NAME","STATUS")) | |
outputbuffer.append("--"*40) | |
for app in myapps: | |
bean=getMBean('/AppDeployments/'+app.getName()+'/Targets/') | |
targetsbean=bean.getTargets() | |
for target in targetsbean: | |
domainRuntime() | |
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime') | |
appstatus=cmo.getCurrentState(app.getName(),target.getName()) | |
outputbuffer.append(" %-50s%20s" %(app.getName(),appstatus)) | |
serverConfig() | |
outputbuffer.append("--"*40) | |
print '\n'.join(outputbuffer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment