ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Getting the count of all messages passing through a queue

Post new topic  Reply to topic
 Getting the count of all messages passing through a queue « View previous topic :: View next topic » 
Author Message
Sridevi
PostPosted: Mon Aug 08, 2005 8:01 am    Post subject: Getting the count of all messages passing through a queue Reply with quote

Newbie

Joined: 08 Aug 2005
Posts: 6

Hi,

We have a requirement to get the count of all messages passing through a queue since the start of a server.

can somebody explain if there is any way for getting the count?

Sridevi.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 08, 2005 8:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's no way to get "the start of a server" from the MQ API, that I know of.

What is the purpose of the requirement?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Aug 08, 2005 8:19 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Ycan use the pcf message "reset queue statistics" to get the number of enqueue's (mqputs) and dequeue's (mqgets) since either (a) the qmgr started or (b) the last reset you did. Since doing the "reset" resets the counts to zero, you'd have to keep track of the numbers yourself.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Sridevi
PostPosted: Mon Aug 08, 2005 8:23 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2005
Posts: 6

We need to monitor the messages passing through each and every queue everyday to find the load of the queue and to generate a report .

Is there any possibility of getting the messages passing through a queue after the restart of a queue manager.
Back to top
View user's profile Send private message
Sridevi
PostPosted: Mon Aug 08, 2005 8:35 am    Post subject: Reply with quote

Newbie

Joined: 08 Aug 2005
Posts: 6

Hi,

I'm very new to MQ . Can you please throw some light on pcf message and "reset queue statistics" or provide me some links for that.

Sridevi
Back to top
View user's profile Send private message
vennela
PostPosted: Mon Aug 08, 2005 9:30 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Look at the PCF manuals in this link

http://www-306.ibm.com/software/integration/mqfamily/library/manualsa/

Look at the support pacs for any examples. Depends on the programming language also.
http://www-306.ibm.com/software/integration/support/supportpacs/category.html#cat1

You have to work a bit to achieve this ut definitely doable.

Good luck
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wschutz
PostPosted: Mon Aug 08, 2005 9:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

If you're a java programmer, download supportpac MS0B (from vennela's link above), and modify the middle part of the sample "PCFMessageListQueueDepth.java" to do this instead:
Code:

         // Build the request

         request = new PCFMessage (CMQCFC.MQCMD_RESET_Q_STATS);
         request.addParameter (CMQC.MQCA_Q_NAME, "TEST");
      //   request.addParameter (CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL);

         // Use the agent to send the request

         System.out.print ("Sending PCF request... ");
         responses = agent.send (request);
         System.out.println ("Received reply.");

         // Display the results

         for (int i = 0; i < responses.length; i++)
         {
            String       name = responses [i].getStringParameterValue (CMQC.MQCA_Q_NAME);
            int       deq = responses [i].getIntParameterValue (CMQC.MQIA_MSG_DEQ_COUNT);
            int       enq = responses [i].getIntParameterValue (CMQC.MQIA_MSG_ENQ_COUNT);

            System.out.println ("Queue " + name + " enqueues " + enq + " dequeues " + deq);
         }


_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
wschutz
PostPosted: Mon Aug 08, 2005 4:55 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Or, if you're a perl programmer, download the perl MQSeries module ( http://search.cpan.org/~hbiersma/MQSeries-1.23/MQSeries.pm )

and code this:
Code:
#!/usr/bin/perl
use MQSeries;
use MQSeries::Command;

my $command = MQSeries::Command->new
               (
                 QueueManager => "TEST"
                )
                  or die("Unable to instantiate command object\n");
my $attr = $command->ResetQueueStatistics
            (
              QName          => 'TEST'
            );

foreach my $key ( sort keys %$attr ) {
      print "\t$key => $attr->{$key}\n";
}


_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Getting the count of all messages passing through a queue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.