Solved

How to get current JMS queue count

Posted on 2010-08-13
8
2,649 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
[X]
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
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
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:

734 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