Date Created: Wed 23-Jan-2008

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


    Using the $AdminControl queryNames command to see running MBean objects. For example we will look for all queryNames .

    #set mbeans [$AdminControl queryNames *:*,type=NameServer]
    #set mbeans [$AdminControl queryNames *]
    set mbeans [$AdminControl queryNames *:*,j2eeType=URLResource]
    puts $mbeans

    listmbeans.jacl

    To run on unix: wsadmin.sh -f ./listmbeans.jacl > result.txt

    The result wil be piped to a file called result.txt

    Some useful information from IBM

    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp

    This command returns a list of all MBean types. Depending on the server to which your scripting client attaches, this list can contain MBeans that run on different servers:

    If the client attaches to a stand-alone WebSphere Application Server, the list contains MBeans that run on that server.
    If the client attaches to a node agent, the list contains MBeans that run in the node agent and MBeans that run on all application servers on that node.

    If the client attaches to a deployment manager, the list contains MBeans that run in the deployment manager, all of the node agents communicating with that deployment manager, and all application servers on the nodes served by those node agents.
    The list that the queryNames command returns is a string representation of JMX ObjectName objects. For example:
    WebSphere:cell=MyCell,name=TraceService,mbeanIdentifier=TraceService,
    type=TraceService,node=MyNode,process=server1

    This example represents a TraceServer object that runs in server1 on MyNode.
    The single queryNames argument represents the ObjectName object for which you are searching. The asterisk ("*") in the example means return all objects, but it is possible to be more specific. As shown in the example, ObjectName has two parts: a domain, and a list of key properties. For MBeans created by the WebSphere Application Server, the domain is WebSphere. If you do not specify a domain when you invoke queryNames, the scripting client assumes the domain is WebSphere. This means that the first example query above is equivalent to:

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

    Comments:

    Remember the domain is case sensitive:

    set mbeans [$AdminControl queryNames websphere:*,j2eeType=URLResource]

    will return nothing where as

    set mbeans [$AdminControl queryNames WebSphere:*,j2eeType=URLResource] will return all the URLResource is any.

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories