Share

Thursday, January 14, 2016

websphere application server status report wsadmin

Objective:

This script will help you to print the “Running Server List” per everyNode registered under Cell. Server statistics made easy now with wsadmin. 

Compatibility:


WAS6.1 and above


Script

Running_Nodes=AdminControl.queryNames('*:type=Server,name=nodeagent,*').split(java.lang.System.getProperty("line.separator"))
print "-----------------------------------------------------------------------"
print "Websphere Status Report by Sarav@mwinventory.in"
print "------------------------------------------------------------------------"
print ""
print ""
for nod in Running_Nodes:
        NodeName=AdminControl.invoke(nod ,"getNodeName()")
        Running_JVMS=AdminControl.queryNames('*:type=Server,node='+NodeName+',*').split(java.lang.System.getProperty("line.separator"))
        print "----------------------------------"
        print "NODENAME:  ", NodeName
        print "----------------------------------"
        for Serv in Running_JVMS:
                print AdminControl.invoke(Serv,"getName()")
        print "----------------------------------"
print "--------------------------------------------------"

Result:
bash-3.00# ./wsadmin.sh -lang jython -username wsadmin -password wsadmin -f status_v2.py
WASX7209I: Connected to process "dmgr" on node MWICellManager01 using SOAP connector;  The type of process is: DeploymentManager
--------------------------------------------------
Websphere Status Report by Sarav@mwinventory.in
--------------------------------------------------


----------------------------------
NODENAME:   MWINode01
----------------------------------
MWI_SERVER01
MWI_SERVER02
MWI_SERVER03
MWI_SERVER04
nodeagent
----------------------------------

----------------------------------
NODENAME:   MWINode02
----------------------------------
MWI_SERVER01
MWI_SERVER02
MWI_SERVER03
MWI_SERVER04
nodeagent
----------------------------------


--------------------------------------------------


Share if you like. Comment for any help as usual.

Hope it helps.

Cheers,
Sarav


No comments :

Post a Comment