Solved

How to get current JMS queue count

Posted on 2010-08-13
8
2,462 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
Comment Utility
What did you use in V5?  A Jacl Script, or something else?
0
 
LVL 41

Expert Comment

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

Author Comment

by:rwskas
Comment Utility
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
 
LVL 41

Expert Comment

by:HonorGod
Comment Utility
Thanks for the status update.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Author Comment

by:rwskas
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for sharing the solution.
0

Featured Post

NetScaler Deployment Guides and Resources

Citrix NetScaler is certified to support many of the most commonly deployed enterprise applications. Deployment guides provide in-depth recommendations on configuring NetScaler to meet specific application requirements.

Join & Write a Comment

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now