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 » General IBM MQ Support » AMQSAIEM.C sample program, what am I looking at?

Post new topic  Reply to topic
 AMQSAIEM.C sample program, what am I looking at? « View previous topic :: View next topic » 
Author Message
Boomn4x4
PostPosted: Mon Jul 02, 2012 10:00 am    Post subject: AMQSAIEM.C sample program, what am I looking at? Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

I'm running the AMQSAIEM.C sample program to pull messages off of the event queues. My question is, what is it that I am looking at? How do I go about decoding what it is the returned data means?

Here is some sample output.

Handle:134567608 Size:13
Index: Selector: Value:
0 -8 (0)
1 -1 (0)
2 -2 (7)
3 -9 (1)
4 -3 (44)
5 -4 (1)
6 -5 (1)
7 -6 (1)
8 -7 (2035)
9 2015 'DEV_MXB931_QM' 0
10 1020 (4)
11 1021 (13)
12 3025 'mxb931' 0

An educatedd guess, tells me that index 8 is a MQRC, 9 is the Qmgr, and 12 is the user... but what about everything else? Better yet, where is this documented?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 02, 2012 10:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

See, I'd point to "2035" as an MQRC, and I'd then guess that it's a security event message. But of course, that wouldn't apply if you'd told it to read from some queue that could never hold a security event message...

Regardless, I'd start with the source for amqsaiem.c and see what would cause it to print that out.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 02, 2012 10:14 am    Post subject: Re: AMQSAIEM.C sample program, what am I looking at? Reply with quote

Grand High Poobah

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

Boomn4x4 wrote:
Better yet, where is this documented?


Strangely, the monitoring event message structure is documented here in the Monitoring MQ section of the InfoCenter.

Above and below that specific link you'll find a wealth of information on this subject.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Boomn4x4
PostPosted: Mon Jul 02, 2012 11:13 am    Post subject: Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

I'm reading through that, and I'm looking through the cmqcfc.h file to try and decipher some of it, but I cannot find where the documentation for the selector is.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 02, 2012 11:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Having taken a moment to actually look at amqsaiem.c, I see that it's using this.

And...
Code:
/*    The name of the event queue to be monitored is passed as a parameter    */
/*    to the program. This would usually be one of the system event queues:-  */
/*            SYSTEM.ADMIN.QMGR.EVENT        Queue Manager events             */
/*            SYSTEM.ADMIN.PERFM.EVENT       Performance events               */
/*            SYSTEM.ADMIN.CHANNEL.EVENT     Channel events                   */
/*            SYSTEM.ADMIN.LOGGER.EVENT      Logger events                    */


So, again, the type of message that you've reported depends on the queue you've told it to read!
Back to top
View user's profile Send private message
Boomn4x4
PostPosted: Mon Jul 02, 2012 11:47 am    Post subject: Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

Which in this case is the QMGR.EVENT queue. I think this is indicated by the selector -3, value of 44. Which in the documentation is a command for MQCMD_Q_MGR_EVENT

So this is what I'm getting from the documentation:

Selector -7 is an MQRC 2035 = NOT_AUTHORIZED.
So, looking at the documentation for Event Message Descriptions, there are 6 types of 2035 messages. By looking at the first one, you can see that the first value is the QMGR name. The second is the reason qualifier, with data value of 4... so of the 6 types, this would be a type 4. In a type 4 message, the thrid value is the COMMAND. And the final value is the user identifier.

This clears up a lot.... but what does the command value mean? of 13?

Edit.... Unless of course the MQCMD code of 13 being an INQUIRE is correct.

So there was a NOT_AUTHORIZED on DEV_MXB931_QM, Type 4, and INQUIRE was preformed, by user mxb931.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 02, 2012 12:13 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Back to top
View user's profile Send private message
Boomn4x4
PostPosted: Tue Jul 03, 2012 3:47 am    Post subject: Reply with quote

Disciple

Joined: 28 Nov 2011
Posts: 172

However, I am still now confused about the "-" numbers. I haven't yet come across documentation that says that every "-" selector is part of the header, but I'm going out on a pretty sturdy limb and assuming that is the case.

According to the documentation, the PCF header has 9 parts. Type, Struct Length, Version, Command, Sequence Number, Control, Comp Code, Reason, and Parmameter count. The message header also has 9 parts... good so far. However, the order of the selectors isn't matching up? The only ones I can match up are the Type, Command, and the Reason.

0 -8 (0)
1 -1 (0)
2 -2 (7) - This is the Structure Type MQCFT_EVENT
3 -9 (1)
4 -3 (44) - This is the Command code Q_MGR_EVENT
5 -4 (1)
6 -5 (1)
7 -6 (1)
8 -7 (2035) - This is the reason MQRC_NOT_AUTHORIZED

What is there to decipher what the remaining values correlate too?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » AMQSAIEM.C sample program, what am I looking at?
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.