informatica:weblogic:scripting:consultas
Table of Contents
WLS
Para conectarnos a la consola de comandos ejecutamos: wlst.sh
Estado de un managed
wls:/offline> connect('weblogic','weblogic1','t3://localhost:7001') Connecting to t3://localhost:7001 with userid weblogic ... Successfully connected to Admin Server 'AdminServer' that belongs to domain 'domino'.
wls:/domino/serverConfig> domainRuntime() Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root. For more help, use help(domainRuntime)
wls:/domino/domainRuntime> cd("/ServerLifeCycleRuntimes/") wls:/domino/domainRuntime/ServerLifeCycleRuntimes> ls() dr-- AdminServer dr-- managed dr-- managed2
Tenemos el AdminServer arrancado, managed RUNNING pero con OutOfMemory (es decir que no responde) y el managed2 parado:
cd('AdminServer') cmo.getState() 'RUNNING'
cd('managed') cmo.getState() 'RUNNING'
cd('managed2') cmo.getState() 'SHUTDOWN'
El estado del servidor managed es equivoco, lo miramos en Runtime:
domainRuntime() cd('/ServerRuntimes/') ls()
dr-- AdminServer
No aparece el managed y no podemos ver el estado, no está funcionando. Si podemos ver el estado del Admin. Entramos dentro del servidor y lo podemos mirar con dos comandos:
cd('AdminServer') get('HealthState') cmo.getHealthState()
Component:ServerRuntime,State:HEALTH_OK,MBean:AdminServer,ReasonCode:[]
Listar Clusters
wls:/prova_Domain/serverConfig> x=ls('/Clusters',returnMap='true') dr-- Cluster_01 dr-- Cluster_02 wls:/prova_Domain/serverConfig> x [Cluster_01, Cluster_02] wls:/prova_Domain/serverConfig> for i in x: ... print i ... Cluster_01 Cluster_02
Lista separados con comas
x=ls('/Clusters',returnMap='true') i=0 lista='' while (i < len(x)-1): lista= x[i] + ',' + lista i=i+1 lista= lista + x[len(x)-1] print lista
informatica/weblogic/scripting/consultas.txt · Last modified: 2015/05/07 09:58 by jose