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 » IBM MQ Installation/Configuration Support » Audit to a Queue

Post new topic  Reply to topic Goto page 1, 2  Next
 Audit to a Queue « View previous topic :: View next topic » 
Author Message
Trainee
PostPosted: Mon May 07, 2007 12:32 pm    Post subject: Audit to a Queue Reply with quote

Centurion

Joined: 27 Oct 2006
Posts: 124

Is there any way that we can know howmany messages got moved(processed) through particular queue without using monitoring tools.

with regards Trainee
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 07, 2007 12:35 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes.

Rewrite a monitoring tool, using PCF messages to get the information.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Trainee
PostPosted: Mon May 07, 2007 1:37 pm    Post subject: Reply with quote

Centurion

Joined: 27 Oct 2006
Posts: 124

Jeff answer honestly too precise for me.I am Trainee


If ACCTQ at queue level is on then it helps?

Thank you
Trainee


Last edited by Trainee on Mon May 07, 2007 1:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 07, 2007 1:39 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Then use a monitoring tool.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Trainee
PostPosted: Tue May 08, 2007 3:33 am    Post subject: Reply with quote

Centurion

Joined: 27 Oct 2006
Posts: 124

Some one told me that there are some IBM Security Channel Exit tools which can tell us homany messages got processed and all sutff...any one has any idea

Thanks
Trainee
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 08, 2007 3:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

There are various exits on the channels and the queues which can be used for various purposes, including possibly number of messages passing through. There's a good sticky on the forum about writing exits. Security exits are an example.

This is the important point!

You will need to write exit code to achieve this - I'm not aware of any IBM supplied exits which provide this out of the box (though I stand to be corrected). Writing exits is not for the beginner (or the trainee) and the consequences of a badly written exit can be dire.

You're much better off using PCF messages as suggested if you're going to write code. Or buy a monitoring solution that supplies the exit code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 08, 2007 3:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Trainee wrote:
Some one told me that there are some IBM Security Channel Exit tools which can tell us homany messages got processed and all sutff


Or ask the some one who told you where these items are....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Tue May 08, 2007 4:04 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Trainee wrote:
Some one told me that there are some IBM Security Channel Exit tools which can tell us homany messages got processed and all sutff


It is not possible with security exit . It is activated only during conection to qmgr, so it can not count messages.

You can do it with other exits and with accounting and statistics mechanism.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue May 08, 2007 4:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

marcin.kasinski wrote:
You can do it with other exits


I stand by my comments above regarding the dangers of badly written exit code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Tue May 08, 2007 5:06 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Trainee wrote:
If ACCTQ at queue level is on then it helps?

If you are on V6 you can use the built in Accounting and Statistics, to read the accounting and statistics messages use the supplied sample: amqsmon (it's in the C samples directory)
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
marcin.kasinski
PostPosted: Tue May 08, 2007 5:06 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Vitor wrote:
marcin.kasinski wrote:
You can do it with other exits


I stand by my comments above regarding the dangers of badly written exit code.


Of course.

I wanted to say that it is possible.
It is possible but not recommended.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Tue May 08, 2007 2:44 pm    Post subject: Reply with quote

Guest




Applications should be written to ensure that all messages are processed, that there are no duplicate or missing 'transactions', that the total number of expected transactions were successfully processed.

If a queue contains no messages, then the total number of MQGETS == total number of MQPUTs.

"How many messages..." sounds like an auditor kind of request. What exactly is the auditor trying to accomplish?
Back to top
fjb_saper
PostPosted: Tue May 08, 2007 6:29 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

bruce2359 wrote:

If a queue contains no messages, then the total number of MQGETS == total number of MQPUTs.


If I remember right an uncommitted get still counts as a get and an ucommitted put still counts as a put. Now change uncommitted to rolled back and you will see that you may have more puts or gets than there were ever messages passing through the queue.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Wed May 09, 2007 4:34 am    Post subject: Reply with quote

Guest




"If I remember right an uncommitted get still counts as a get and an ucommitted put still counts as a put. "

My assumption about a 'simple transaction' (good for most MQ applications) is that the transaction begins (MQBEGIN); a message arrives and is consumed (MQGET) and a reply is sent (MQPUT).

Yes, at a given instance in time, a message may have been MQPUT to a queue, but not MQGET yet. This is an incomplete transaction - in doubt. At MQCMIT, the transaction ends, and MQ in once again in a consistent state.

"Now change uncommitted to rolled back and you will see that you may have more puts or gets than there were ever messages passing through the queue. "

MQCMIT represents the application programs decision to complete (syncpoint) the transaction; MQBACK represents the application programs decision to undo the transaction. For a simple transaction, if committed, MQGET-MQPUT=0. For both MQCMIT and MQBACK, it depends on when in the application logic does the commit/backout. MQCMIT/MQBACK make this into something other than a simple transaction; therefore, the math is more difficult - it depends.

MQs API calls determine how many messages are "passing through the queue."

Counts of these kinds of activities (statistical and accounting) can be captured by MQ Monitoring. Read MQ V6 Monitoring WebSphere MQ (sc34-6593).

Counting things is one aspect of auditing an application. For a payroll application (for example): did the number of time-card messages = the number of employees that submitted time-cards?

More important would be: did the number of dollars balance? did the correct number of employees get paid? MQ can't help much with these, as they are under application control.
Back to top
PeterPotkay
PostPosted: Fri May 11, 2007 6:01 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

bruce2359 wrote:
If a queue contains no messages, then the total number of MQGETS == total number of MQPUTs.

Also, messages expiring on a queue will have # of MQGETS < # of MQPUTS.

Expiring messages are often "missing transactions that MQ lost".
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Audit to 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.