Posts

Showing posts with the label getNode in Jython

Jython script for Server Stop, Start, restart using wsadmin

Image
Server Control from wsadmin The building blocks for this script are as follows: Get Node name  Get the Server name Get the server state Using the AdminControl stop/start/restart How to get Node Name in wsadmin using Jython? We can use the nodeName using AdminControl  with getNode method or completeObjectName querying. wsadmin>nodeName=AdminControl.getNode() wsadmin>print nodeName ubuntu-was8Node01 wsadmin>objn = AdminControl.completeObjectName('WebSphere:type=Server,*') wsadmin>print objn WebSphere:name=server1,process=server1,platform=proxy,node=ubuntu-was8Node01,j2eeType=J2EEServer,version=8.5.5.6,type=Server,mbeanIdentifier=cells/ubuntu-was8Node01Cell/nodes/ubuntu-was8Node01/servers/server1/server.xml#Server_1183121908656,cell=ubuntu-was8Node01Cell,spec=1.0,processType=UnManagedProcess wsadmin>print AdminControl.getAttribute(objn, 'nodeName') ubuntu-was8Node01 In the above interaction we have experimented in two options directl...