5

In Jython WebSphere Wsadmin:

It appears that I can get to the server's names from the nodeName, however I haven't managed to find a direct way to find the nodeName of a server.

I thought about creating a map of all the nodes, but that is expensive.

Can anyone help?

slm
  • 15,396
  • 12
  • 109
  • 124
user967710
  • 1,815
  • 3
  • 32
  • 58

2 Answers2

7

You can get the node name of the server using the Server MBean.

You can find info on the Server MBean here http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.ejbfep.multiplatform.doc%2Finfo%2Fae%2Fae%2Fcjmx_overview.html

objNameString = AdminControl.completeObjectName('WebSphere:type=Server,*') 
print AdminControl.getAttribute(objNameString, 'nodeName')
Snehan Solomon
  • 432
  • 3
  • 17
4

You can also get the node name using the getNode() method on AdminControl:

wsadmin>objn = AdminControl.completeObjectName('WebSphere:type=Server,*')

wsadmin>print AdminControl.getAttribute(objn, 'nodeName')
Node01

wsadmin>print AdminControl.getNode()
Node01

References

slm
  • 15,396
  • 12
  • 109
  • 124