O script é bem simples e por isso estou omitindo maiores explicações. Segue o script.
#variable definitions================
username='weblogic'
password='weblogic'
urladmin='t3://localhost:7001'
appName='applicationName'
serverName='serverName'
#end variable definitions============
#connects to admin server
connect(username, password, urladmin)
cd('domainRuntime:/AppRuntimeStateRuntime/AppRuntimeStateRuntime')
#get intended state for application
intendedState = cmo.getIntendedState(appName)
print 'Intended state for app ' + intendedState
#get current real state for app in specific server
currentState = cmo.getCurrentState(appName, serverName)
print 'Current state in server '+ serverName + ' ==>> ' + currentState
cd('domainRuntime:/ServerRuntimes/'+ serverName +'/ApplicationRuntimes/'+appName)
#shows app attributes including current health.
print 'Current information for app ' + appName + ' in server ' + serverName + ' ==>> ' + ls('a')
[]s

Nenhum comentário:
Postar um comentário