Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to get current JMS queue count

Posted on 2010-08-13
8
Medium Priority
?
2,814 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…
Suggested Courses

704 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