Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2910
  • Last Modified:

How to get current JMS queue count

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
rwskas
Asked:
rwskas
  • 4
  • 4
1 Solution
 
HonorGodCommented:
What did you use in V5?  A Jacl Script, or something else?
0
 
HonorGodCommented:
I V5, you probably used either the embedded MQ, or external MQ.  Which was it?
0
 
rwskasAuthor Commented:
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
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.

 
HonorGodCommented:
Thanks for the status update.
0
 
rwskasAuthor Commented:
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
 
rwskasAuthor Commented:
I found the correct commands:
QID=AdminControl.queryNames('type=SIBQueuePoint,name=sqoutbd,*')
QDepth=AdminControl.getAttribute(QID,'depth')
0
 
rwskasAuthor Commented:
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
 
HonorGodCommented:
Thanks for sharing the solution.
0

Featured Post

Managing Security Policy in a Changing Environment

The enterprise network environment is evolving rapidly as companies extend their physical data centers to embrace cloud computing and software-defined networking. This new reality means that the challenge of managing the security policy is much more dynamic and complex.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now