Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to get current JMS queue count

Posted on 2010-08-13
8
2,544 Views
Last Modified: 2013-12-11
Using wsadmin with JYTHON, how can I query my JMS queue? We had a process in v5 that we used to alert us when the queue was overloading, and would like to recreate it for v6.

0
Comment
Question by:rwskas
  • 4
  • 4
8 Comments
 
LVL 41

Expert Comment

by:HonorGod
ID: 33434322
What did you use in V5?  A Jacl Script, or something else?
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 33434326
I V5, you probably used either the embedded MQ, or external MQ.  Which was it?
0
 
LVL 6

Author Comment

by:rwskas
ID: 33520891
Sorry, I am unsure. I have just recently taken ownership of this over, and no longer have access to the previous scripts that were used. I will work on trying to dig it up though.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 41

Expert Comment

by:HonorGod
ID: 33521320
Thanks for the status update.
0
 
LVL 6

Author Comment

by:rwskas
ID: 33558557
Looks like we were using 'jms_queue_count.cmd'
Below is what I believe is what I need to move to Jython for V6..

rem *** Get the CURRENT Message Count from the JMS Queue
    java weblogic.Admin -adminurl %WLS_ADMIN_URL% -username %WLS_ADMIN_USER% -password %WLS_ADMIN_PASS% GET -pretty -mbean "%WLS_DOMAIN%:JMSServerRuntime=%%I,Location=%WLS_JMS_LOCATION%,Name=%%J,ServerRuntime=%WLS_JMS_LOCATION%,Type=JMSDestinationRuntime" -property MessagesCurrentCount | find /i "Message" > %WLS_TEMPFILE%

    rem *** Get the PENDING Message Count from the JMS Queue
    rem java weblogic.Admin -adminurl %WLS_ADMIN_URL% -username %WLS_ADMIN_USER% -password %WLS_ADMIN_PASS% GET -pretty -mbean "%WLS_DOMAIN%:JMSServerRuntime=%%I,Location=%WLS_JMS_LOCATION%,Name=%%J,ServerRuntime=%WLS_JMS_LOCATION%,Type=JMSDestinationRuntime" -property MessagesPendingCount | find /i "Message" >> %WLS_TEMPFILE%

Open in new window

0
 
LVL 6

Accepted Solution

by:
rwskas earned 0 total points
ID: 34192649
I found the correct commands:
QID=AdminControl.queryNames('type=SIBQueuePoint,name=sqoutbd,*')
QDepth=AdminControl.getAttribute(QID,'depth')
0
 
LVL 6

Author Closing Comment

by:rwskas
ID: 34221306
Ended up finding the commands on my own, posted them in case anyone else searches for this question.

replace sqoutbd with the name of your queue

The variable QDepth will be a the depth of that particular queue

To display it in jython:
print "Queue Depth: "+QDepth
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 34222018
Thanks for sharing the solution.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Spring Framework HTTPSession management 1 45
even odd program using while loop 3 60
Java: anonymous class 4 29
Why doesn't this text field show up on my Applet frame? 2 19
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question