Question

I'd like to use the WSADMIN command that is part of WebSphere 7 to query the state of the queues on the system.

Can anyone help me out?

Thanks

Was it helpful?

Solution 2

So to find out the queue depths I've written this JACK script...

set qpoint "WebSphere:*,type=SIBQueuePoint"
set queues [$AdminControl queryNames $qpoint]
foreach q $queues {
set identifier [$AdminControl getAttribute $q identifier]
set size [$AdminControl getAttribute $q depth]
puts "$identifier size: $size messages"
puts [$AdminControl getAttributes $q]

Stuff it in a file on the box, jeff.jacl and call the command...

/opt/IBM/WebSphere/AppServer/bin # ./wsadmin.sh -profile jp.cmd.jacl

And what do you get? well you get a whole bag of awesomeness!

WASX7209I: Connected to process "server1" on node WRSNode using SOAP connector; The type of process is: UnManagedProcess
CHANGE_REQUEST size: 15 messages
{depth 15} {state ACTIVE} {id CFAC834BE6AF5D9A30451D01_QUEUE_51} {identifier CHANGE_REQUEST} {highMessageThreshold 50000} {sendAllowed true}
ETL_DEAD size: 378 messages

Next job is to see if I can all the java code that is used by JACL directly.

OTHER TIPS

For anyone interested, here's the jython version of jeff's answer.

qpoint = 'WebSphere:*,type=SIBQueuePoint'
queues = AdminControl.queryNames(qpoint).split()

for q in queues:
   identifier = AdminControl.getAttribute(q, 'identifier')
   size = AdminControl.getAttribute(q, 'depth')
   print identifier + ' size: ' + size + ' messages'
   print AdminControl.getAttributes(q)

In order to retrieve the depth of a SIB queue using the WebSphere PMI, you will need to select the following two counters:

AvailableMessageCount and UnavailableMessageCount

Here is how: From the WebSphere Application Server Admin Console, go to the Performance Monitoring Infrastructure (PMI) panel of the application server where the messaging engine is hosted:

Application servers > your_app_server_name > Performance Monitoring Infrastructure (PMI)

You will be on the Configuration tab by default. You can choose to switch to the Runtime tab if you wish this monitoring to start without restarting the application server.

Once on the PMI panel, click on the link "Custom", the label of the last radio button. This should take you to the Custom monitoring level panel. From the left-hand navigation tree, select: - SIB Service - SIB Messaging Engines - *- Destinations- Queues Select both counters: AvailableMessageCount and UnavailableMessageCount and click the Enable button located at the top. Your setting should be saved at this point.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top