WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Stop and Start Script

    Posted Tue January 24, 2012 06:44 PM
    Hi Guys,

    Can Some One Provide me Script for Stopping And Starting All JVMs in a Single Node.

    Currently we have 5 nodes each having 14 JVMs all in one Cluster.

    WebSphere 6.1 On AIX.

    Thanks
    Ravi


  • 2.  Stop and Start Script

    Posted Tue January 24, 2012 08:08 PM
    you can use jython scripting. Check the documentation about how to start/stop cluster using jython here: publib.boulder.ibm.com/infocenter/wasinf...

    Also check this blog, he is one of the blooger on GWC also. The following link has a script to stop the cluster: websphere-automation.blogspot.com/2011/0...


  • 3.  Stop and Start Script

    Posted Wed January 25, 2012 04:15 PM
    Hi Joseph,

    Thanks For the Links. But its all about Cluster Level.

    But i am looking for Node Level.

    Thanks
    Ravi


  • 4.  Stop and Start Script

    Posted Wed January 25, 2012 04:43 PM
    Ravi,
    Just curious by what's the reason for wanting to terminate all java processes on a node?


    Joseph's suggested direction of leveraging a jython at the cluster level is well advised.  If you terminate all java processes on the node then you would terminate the nodeagent process as well making remote adminsitration impossible. 

    Can you elaborate for us and perhaps a member could offer a better option or direction to achieve the same end goal.

    Erik


  • 5.  Stop and Start Script

    Posted Tue January 31, 2012 08:33 PM
    This may not be the most ideal solution, but you can always write a simple shell script for each node to shut down all the JVMs on that node.  In the script you'd just run the stopServer.sh script for each JVM.


  • 6.  Stop and Start Script

    Posted Tue January 31, 2012 08:55 PM
    If you want to do it using wsadmin scripting, I think this should work.  No promises though, I haven't tested it.

    node_name = 'TestNode'
    server_namess = [AdminConfig.showAttribute(id, 'name') for id in AdminConfig.list('Server', AdminConfig.getid('/Node:%s/' % node_name)).split('\n')]

    for server_name in server_names:
        AdminControl.stopServer(server_name, node_name)