Posts

Showing posts with the label AdminControl

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...

Administration objects and their help in wsadmin

Image
Welcome to Jython exclusive blog developed for the WebSphere Admins only. Here in this post we can explore more about the real-time wsadmin Objects. Which are most critical to develop the automate WebSphere server side.  wsadmin>print AdminConfig.help() WASX7053I: The AdminConfig object communicates with the Config Service in a WebSphere server to manipulate configuration data for a WebSphere installation. AdminConfig has commands to list, create, remove, display, and modify configuration data, as well as commands to display information about configuration data types. Most of the commands supported by AdminConfig operate in two modes: the default mode is one in which AdminConfig communicates with the WebSphere server to accomplish its tasks. A local mode is also possible, in which no server communication takes place. The local mode of operation is invoked by bringing up the scripting client with ...