Link to home
Create AccountLog in
Avatar of kalyan_arjun

asked on

Jython Script to get the status of the JVM's

I want a jython script to get the status of the servers,nodeagent in the websphere application server
Avatar of HonorGod
Flag of United States of America image

By status, you mean running vs. stopped?
The following script can be used to list the servers, but it doesn't provide the server status.
If you let me know what want/need, I can probably provide a script to do it.

For example, this script outputs information about the configuration, even if the Java processes
aren't running.

To use, invoke it with a command like:

wsadmin -lang jython -conntype none -f

Output is like:

 serverName| CellName | NodeName | Server
nodeagent  | myCell01 | myNode01 | nodeagent
server1    | myCell01 | myNode01 | server1
webserver1 | myCell01 | myNode01 | webserver1
unfortunately, the proportional font used doesn't make the output look very nice.  Sorry about that.
Oh, you also have to tell me with which version of WebSphere you need the script.
The reason is that the one provided above works for V 6.1, but not 6.0 because the
version of Jython that comes with WSAS 6.0 is v 2.0, which doesn't have the RegExp
support that Jython 2.1 (which comes with WSAS 6.1) does.
Avatar of kalyan_arjun


websphere 6.1.I want the status of servers even though it is stopped or running.
I know how to get the configuration stuff but doesnt't know how to get the status of all the servers and nodeagents.

one moment please... :-)
I like the way you had done the output in a format which is great for list servers.

Awesome and thanks
Avatar of HonorGod
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Is there anything else that you need for this question?
Thanks for the grade & points.

Good luck