Академический Документы
Профессиональный Документы
Культура Документы
: Using
IBM MQ Tools to Work Out What Applications
Have Done
Matt Leming – lemingma@uk.ibm.com
IBM Hursley - UK
Symptoms include:
1
Agenda – the MQ Toolbox
• Who’s connected?
2
Who’s connected?
DISPLAY CONN
DISPLAY CONN(*) TYPE(HANDLE) ALL DIS CONN(*) ALL
OBJNAME(WLMMDB.REQUEST) OBJTYPE(QUEUE)
ASTATE(NONE) HSTATE(INACTIVE)
OPENOPTS(MQOO_OUTPUT,MQOO_FAIL_IF_QUIESCING)
TYPE(HANDLE) records let you find
READA(NO) applications by the objects they access.
See all open handles for an app in one place,
OBJNAME(SENDINGAPP.REPLY) OBJTYPE(QUEUE) unlike DIS QSTATUS records
ASTATE(ACTIVE) HSTATE(ACTIVE)
OPENOPTS(MQOO_INPUT_SHARED,MQOO_INQUIRE,MQOO_SAVE_ALL_CONTEXT,MQOO_FAIL_IF_QUIESCING)
READA(NO)
AMQ8276: Display Connection details. Channel name + IP help identify client apps.
CONN(577C425321295301)
EXTCONN(414D5143474154455741593120202020)
TYPE(CONN)
PID(9740) TID(185)
APPLDESC(WebSphere MQ Channel) APPLTAG(jms/GATEWAY1_CF)
APPLTYPE(SYSTEM) ASTATE(NONE)
CHANNEL(WAS.CLIENTS) CONNAME(127.0.0.1)
CONNOPTS(MQCNO_SHARED_BINDING) USERID(pbroad)
UOWLOG( ) UOWSTDA(2014-04-08) MQ V7.5 and later JMS clients can supply
UOWSTTI(13.24.00) UOWLOGDA( ) an application name in the CF
UOWLOGTI( ) URTYPE(XA)
EXTURID(XA_FORMATID[DSAW]
Long running UOW information.
XA_GTRID[00000145414B8AB40000000104DF48FC0001020304050607080900010203040506070809]
XA_BQUAL[00000145414B8AB40000000104DF48FC0001020304050607080900010203040506070809000000010000000000000000
XID can be tied up with app server txn timeout
000000000001])
QMURID(0.7940075) UOWSTATE(ACTIVE)
4
DISPLAY CHSTATUS
DISPLAY CHSTATUS(*) ALL
Note that multiple CONN might share one SVRCONN channel instance
5
Automatic detection if no-one is
connected
AMQSCLM Sending apps
Sending
Sendingapps
apps
1) Normal operation
Cluster
WLM
Round-robin message distribution
AMQSCLM AMQSCLM AMQSCLM
7
AMQSCLM Sending apps
Sending
Sendingapps
apps
2) Application failure
Cluster
WLM
Round-robin message distribution
Messages AMQSCLM AMQSCLM AMQSCLM
8
AMQSCLM Sending apps
Sending
Sendingapps
apps
3) Failure Detection
Cluster
WLM
Round-robin message distribution
AMQSCLM AMQSCLM AMQSCLM
AMQSCLM
regularly
Target Target Target
checks the qmgr 1 qmgr 2 qmgr n
IPPROCS(0) IPPROCS(>=1)
. . . IPPROCS(>=1)
queue and
detects
IPPROCS(0)
9
AMQSCLM Sending apps
Sending
Sendingapps
apps
4) Redirect Messages
Cluster
AMQSCLM
WLM
reduces
queue priority Round-robin message distribution
in cluster, to AMQSCLM AMQSCLM AMQSCLM
stop new Target Target Target
messages qmgr 1 qmgr 2 qmgr n
arriving IPPROCS(0) IPPROCS(>=1)
. . . IPPROCS(>=1)
10
AMQSCLM Sending apps
Sending
Sendingapps
apps
5) Un-maroon Msgs (optional)
Cluster
WLM
AMQSCLM
tells qmgr to Round-robin message distribution
redistribute AMQSCLM AMQSCLM AMQSCLM
11
AMQSCLM summary
– Precompiled
– Source code
12
Are messages flowing?
Real-time/online Monitoring – Queues
• Set detail level for QMGR. Override for individual Queues
ALTER QMGR MONQ(MEDIUM)
ALTER QLOCAL(QUEUE1) MONQ(HIGH)
ALTER QLOCAL(QUEUE2) MONQ(OFF)
Estimations of the time in microseconds that messages are waiting on the queue for
processing.
First value: Calculated from recent activity
Second value: Calculated from longer term activity
14
Real-time/online Monitoring – Channels
ALTER QMGR MONCHL(MEDIUM)
ALTER CHANNEL(CLUSTER1.QM1) CHLTYPE(CLUSRCVR) MONCHL(HIGH)
15
Accounting and Statistics Overview
CONNs
Queues Channels
QMGR
Statistics Accounting
Messages Messages
• Time period
17
Simple practical example using amqsmon
ALTER QMGR STATMQI(ON)
Wait a bit
RESET QMGR TYPE(STATISTICS)
amqsmon -m GATEWAY1 -t statistics -a -w 0
MonitoringType: MQIStatistics
QueueManager: 'GATEWAY1' • Overall QMGR busyness
IntervalStartDate: '2014-04-09'
IntervalStartTime: '00.00.35'
IntervalEndDate: '2014-04-09' • Simple data format
IntervalEndTime: '00.01.13'
CommandLevel: 700 – Multiple values are
ConnCount: 35
[Persistent, NonPersistent]
PutCount: [271, 0]
PutFailCount: 0
Put1Count: [2, 0] • One message every X seconds
Put1FailCount: 0
PutBytes: [273976, 0] – Use amqsmon directly (perl/cron)
GetCount: [270, 0]
GetBytes: [269468, 0]
GetFailCount: 19 • Low/high water marks for
DurableSubscriptionHighWater: [0, 0, 0, 0] subscriptions
DurableSubscriptionLowWater: [0, 0, 0, 0]
NonDurableSubscriptionHighWater: [0, 0, 0, 0]
NonDurableSubscriptionLowWater: [0, 0, 0, 0]
– Grouped by subscription type
PutTopicCount: [0, 0]
PutTopicFailCount: 0
Put1TopicCount: [0, 0]
Put1TopicFailCount: 0
PutTopicBytes: [0, 0]
PublishMsgCount: [0, 0]
PublishMsgBytes: [0, 0]
18
Where are messages going?
MQ networks can be complex
App2A
Requests Replies
SDR/RCVR
App1 Cluster
SDR/RCVR
App2B
Replies
• At each of the dots stuck / mis-sent messages are possible
– MQOPENs of the wrong Queue / Queue Manager by apps
– Full queues
– Stopped channels
– Stopped apps
– Incorrectly configured QREMOTE/QALIAS routing objects
– Cluster membership problems
• The standard problem diagnosis approach
– Methodically checking channels/queues/DLQs at each point
• Is there anything to speed up this process?
20
Trace Route
dspmqrte
dspmqrte SDR/RCVR
Cluster
SDR/RCVR
dspmqrte
26
How can I look back in time?
What happened to my messages at 2am this
morning?
• Enterprise monitoring solution
– DLQ alerts, queue depth alerts, channel status alerts
– Unresolved running units of work
– Historical MQ monitoring, accounting and stats data
• MQ error logs for all qmgrs that could have been involved
– Channel errors
– Authentication issues
29
What about the MQ Recovery Log?
....WebS
tedious bit?
00384: 70 68 65 72 65 20 4D 51 20 43 6C 69 65 6E 74 20 phere MQ Client
00400: 66 6F 72 20 4A 61 76 61 32 30 31 33 31 32 31 39 for Java20131219
00416: 31 34 32 32 33 32 32 32 20 20 20 20 00 00 00 00 14223222 ....
00432: A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ¤...............
00448: 52 46 48 20 00 00 00 02 00 00 00 A4 00 00 01 11 RFH .......¤....
00464: 00 00 04 B8 4D 51 53 54 52 20 20 20 00 00 00 00 ...¸MQSTR ....
00480: 00 00 04 B8 00 00 00 20 3C 6D 63 64 3E 3C 4D 73 ...¸... <mcd><Ms
00496: 64 3E 6A 6D 73 5F 74 65 78 74 3C 2F 4D 73 64 3E d>jms_text</Msd>
00512: 3C 2F 6D 63 64 3E 20 20 00 00 00 58 3C 6A 6D 73 </mcd> ...X<jms
00528: 3E 3C 44 73 74 3E 71 75 65 75 65 3A 2F 2F 2F 51 ><Dst>queue:///Q
00544: 31 3C 2F 44 73 74 3E 3C 54 6D 73 3E 31 33 38 37 1</Dst><Tms>1387
00560: 34 36 32 39 35 32 32 32 36 3C 2F 54 6D 73 3E 3C 462952226</Tms><
00576: 43 69 64 3E 30 30 30 30 30 30 39 39 3C 2F 43 69 Cid>00000099</Ci
31
00592: 64 3E 3C 44 6C 76 3E 32 3C 2F 44 6C 76 3E 3C 2F d><Dlv>2</Dlv></
Check out dmpmqlog scraper tool
32
dmpmqlog scraper tool output
33
Summary
34
Where can I get more information?
IBM Messaging developerWorks
developer.ibm.com/messaging
LinkedIn
Ibm.biz/ibmmessaging
Twitter
@IBMMessaging
IBM MQ Facebook
Facebook.com/IBM-MQ-8304628654/
35
Hybrid Messaging from the IBM experts at InterConnect 2016
Sunday Wednesday
14:30-15:30 6408 Hybrid messaging roadmap (InnerCircle) 08:30-09:30 3602 Managing your MQ environment
• http://ibm.biz/mqaas_red
Questions?
Notices and Disclaimers
Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission
from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of
initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS
DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE
USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY.
IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers
have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in
which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and
discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their
specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and
interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such
laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
40
Notices and Disclaimers Con’t.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not
tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the
ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual
property right.
IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®,
FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG,
Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®,
PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®,
StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business
Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
41
Thank You
Your Feedback is Important!