Technical Blog Post
Abstract
Commonly used wsadmin scripts for WebSphere Application Server SIBus
Body
You may often be asked by the IBM Support personnel to run one or more wsadmin scripts when you open a Problem Record (PMR) or Service Request (SR) with IBM to investigate an issue with WebSphere SIB Messaging. In this blog entry I have put together the most commonly used wsadmin scripts that will be useful for debugging SIB related issues. Each script is included as a zip file in the appropriate section below. Just download the one(s) you want and unzip the file(s). I have also included all of the scripts in one zip file at the end of this blog entry in the Resources section.
Running a Jython script with wsadmin:
1. Download the script to a temp location(/tmp/ or c:\temp\).
2. Change to the correct profile directory. Usually the profile directory of the application server which hosts the Messaging Engine, or the profile directory of the deployment manager in an ND environment.
3. Run the script as follows:
Windows:
DMGR_PROFILE\bin\wsadmin -lang jython -f C:\temp\<yourscript.py>
WAS_PROFILE\bin\wsadmin -lang jython -f C:\temp\<yourscript.py>
DMGR_PROFILE\bin\wsadmin -lang jython -f C:\temp\printSIBusSummary.py output.xml
UNIX:
DMGR_PROFILE/bin/wsadmin.sh -lang jython -f /temp/<yourscript.py>
WAS_PROFILE/bin/wsadmin.sh -lang jython -f /temp<yourscript.py>
DMGR_PROFILE/bin/wsadmin.sh -lang jython -f /temp/printSIBusSummary.py output.xml
1. How do I create a messagestore Dump?
You can create a messagestore dump by running the wsadmin script provided below.
The dump is created as an XML file in the WAS_PROFILE_ROOT/logs/<yourserver> directory of the server hosting the messaging engine.
The file is named according to the format: SIBdump-messagingenginename-timestampUUID.xml
Example filenames:
SIBdump-ProdCluster.000-ProdBus-20130328161911612.xml
SIBdump-aix1Node01.TestServer-TestBus-20130328161429412.xml
Scripts:
messagestoredump.py script - messagestoredump.zip
Run this script from the profile directory of the deployment manager if you want to collect messagestore dumps for all the messaging engines in the environment.
dumpsingleME.py script - dumpsingleME.zip
Run this script from the profile directory of the application server hosting the messaging engine if you want to collect messagestore dump for a single messaging engine.
Sample Output:
<MessageStore> <itemStreams> <ItemStreamLink id="0" state="Available"> <class>com.ibm.ws.sib.msgstore.ItemStream</class> <priority>5</priority> <canExpireSilently></canExpireSilently> <storageStrategy>STORE_NEVER</storageStrategy> <expiryTime>0</expiryTime> <sequence>0</sequence> <tranID>null</tranID> <tickValue>0</tickValue> <items> <ItemLink id="2" state="Available" refCount="3" refCountDecreasing="false"> <class>com.ibm.ws.sib.msgstore.Item</class> <priority>5</priority> <canExpireSilently></canExpireSilently> <storageStrategy>STORE_NEVER</storageStrategy> <expiryTime>0</expiryTime> <sequence>1</sequence> <tranID>null</tranID> <tickValue>0</tickValue> </ItemLink></items></ItemStreamLink></itemStreams></MessageStore> |
2. How do I print a summary of the runtime state of all messaging engines running in a cell?
printSIBusSummary.py script can be used to print a summary of the runtime state of all messaging engines running in a cell. It goes down as far as the depths of individual items, such as queue points, remote queue points, publication points, subscriptions, mediation points, and link transmitters. However, this script does not print out details of individual messages. It should be run against the deployment manager to list out all messaging engines in all buses.
Script:
printSIBusSummary.py script - printSIBusSummary.zip
Sample Output:
<?xml version="1.0"?> <SIBusSummary> <Bus name="Bus2"> <MessagingEngine name="Node1.server1-Bus2" uuid="B04215B7389FDA8F" state="Started" activeServer="server1"> <QueuePoints> <QueuePoint name="Bus2Queue1@Node1.server1-Bus2" state="ACTIVE" depth="9" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="RemoteMediatedQueue1@Node1.server1-Bus2" state="ACTIVE" depth="5" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="Node1.server2-Bus2" meUUID="CC8EAD412746BA2A" currentInboundMessages="0" inboundMessagesReceived="0" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> <QueuePoint name="_PSIMP.PROXY.QUEUE_B04215B7389FDA8F@Node1.server1-Bus2" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="Node1.server2-Bus2" meUUID="CC8EAD412746BA2A" currentInboundMessages="0" inboundMessagesReceived="2" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> <QueuePoint name="_PTRM_B04215B7389FDA8F@Node1.server1-Bus2" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_SYSTEM.Exception.Destination.Node1.server1-Bus2@Node1.server1-Bus2" state="ACTIVE" depth="3" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PSIMP.TDRECEIVER_B04215B7389FDA8F@Node1.server1-Bus2" state="ACTIVE" depth="0" h ighMessageThreshold="50000" sendAllowed="1"/> </QueuePoints> <RemoteQueuePoints> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_CC8EAD412746BA2A@Node1.server1-Bus2" remoteME="Node1.server2-Bus2" remoteMEUUID="CC8EAD412746BA2A" currentOutboundMessages="0" outboundMessageSent="4" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> </RemoteQueuePoints> <MediationPoints> </MediationPoints> <RemoteMediationPoints> <RemoteMediationPoint name="RemoteMediatedQueue1@Node1.server1-Bus2" remoteME="Node1.server2-Bus2" remoteMEUUID="CC8EAD412746BA2A" currentOutboundMessages="0" outboundMessageSent="0"/> </RemoteMediationPoints> <PublicationPoints> <PublicationPoint name="Default.Topic.Space@Node1.server1-Bus2" depth="0" highMessageThreshold="50000" sendAllowed="1"> </PublicationPoint> </PublicationPoints> <BusLinks> <BusLink name="Bus1Bus2Link" foreignBus="Bus1" state="STARTED"> <LinkReceiver state="STARTED" me="Node1.server1-Bus1" meUUID="92FF69453638CD2F" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="4" timeSinceLastMessageReceived="18809ms" /> <LinkReceiver state="STARTED" me="cluster1.000-Bus1" meUUID="C96051A1F0F91AB3" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="0" /> <LinkReceiver state="STARTED" me="cluster1.001-Bus1" meUUID="122AAD73434FF5DA" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="0" /> <LinkReceiver state="STARTED" me="cluster1.000-Bus1" meUUID="C96051A1F0F91AB3" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="2" timeSinceLastMessageReceived="20091ms" /> <LinkReceiver state="STARTED" me="cluster1.001-Bus1" meUUID="122AAD73434FF5DA" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="0" /> <LinkTransmitter state="STARTED" linkType="SIBVirtualGatewayLink" transmitterType="QUEUE" sendAllowed="1" currentOutboundMessages="0" messagesSent="3" timeSinceLastMessageSent="17509ms"/> </BusLink> </BusLinks> <WMQLinks> <WMQLink name="MQBus1Link" state="RUNNING" messagesReceived="0"> <SenderChannel channelName="TO.PAB" state="STANDBY" virtualQmgr="WAS80" ipAddress="" messagesSent="0" currentLUWID="0" currentSequenceNo="0" inDoubt="0"> <SenderChannelTransmitter status="STARTED" currentOutboundMessages="0" messagesSent="0"> <KnownRemoteSenderChannelTransmitter me="Node1.server2-Bus2" meUUID="CC8EAD412746BA2A" currentInboundMessages="0" inboundMessagesReceived="0"/> </SenderChannelTransmitter> </SenderChannel> <ReceiverChannel state="INACTIVE"> </ReceiverChannel> </WMQLink> </WMQLinks> </MessagingEngine> <MessagingEngine name="Node1.server2-Bus2" uuid="CC8EAD412746BA2A" state="Started" activeServer="server2"> <QueuePoints> <QueuePoint name="_SYSTEM.Exception.Destination.Node1.server2-Bus2@Node1.server2-Bus2" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PSIMP.PROXY.QUEUE_CC8EAD412746BA2A@Node1.server2-Bus2" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="Node1.server1-Bus2" meUUID="B04215B7389FDA8F" currentInboundMessages="0" inboundMessagesReceived="12" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> <QueuePoint name="_PTRM_CC8EAD412746BA2A@Node1.server2-Bus2" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PSIMP.TDRECEIVER_CC8EAD412746BA2A@Node1.server2-Bus2" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> </QueuePoints> <RemoteQueuePoints> <RemoteQueuePoint name="RemoteMediatedQueue1@Node1.server2-Bus2" remoteME="Node1.server1-Bus2" remoteMEUUID="B04215B7389FDA8F" currentOutboundMessages="0" outboundMessageSent="2" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_B04215B7389FDA8F@Node1.server2-Bus2" remoteME="Node1.server1-Bus2" remoteMEUUID="B04215B7389FDA8F" currentOutboundMessages="0" outboundMessageSent="8" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> </RemoteQueuePoints> <MediationPoints> <MediationPoint name="RemoteMediatedQueue1@Node1.server2-Bus2" status="Started" depth="0" highMessageThreshold="50000" sendAllowed="1"/> </MediationPoints> <RemoteMediationPoints> </RemoteMediationPoints> <PublicationPoints> <PublicationPoint name="Default.Topic.Space@Node1.server2-Bus2" depth="0" highMessageThreshold="50000" sendAllowed="1"> </PublicationPoint> </PublicationPoints> <BusLinks> <BusLink name="Bus2:MQBus1" foreignBus="MQBus1"> <LinkTransmitter state="STARTED" linkType="SIBVirtualMQLink" transmitterType="QUEUE" sendAllowed="1" currentOutboundMessages="0" messagesSent="0"/> </BusLink> </BusLinks> <WMQLinks> </WMQLinks> </MessagingEngine> </Bus> <Bus name="Bus1"> <MessagingEngine name="Node1.server1-Bus1" uuid="92FF69453638CD2F" state="Started" activeServer="server1"> <QueuePoints> <QueuePoint name="_PTRM_92FF69453638CD2F@Node1.server1-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_SYSTEM.Exception.Destination.Node1.server1-Bus1@Node1.server1-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PSIMP.PROXY.QUEUE_92FF69453638CD2F@Node1.server1-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="cluster1.001-Bus1" meUUID="122AAD73434FF5DA" currentInboundMessages="0" inboundMessagesReceived="3" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> <KnownRemoteQueuePoint me="cluster1.000-Bus1" meUUID="C96051A1F0F91AB3" currentInboundMessages="0" inboundMessagesReceived="3" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> <QueuePoint name="_PSIMP.TDRECEIVER_92FF69453638CD2F@Node1.server1-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="Bus1Queue1@Node1.server1-Bus1" state="ACTIVE" depth="3" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="cluster1.001-Bus1" meUUID="122AAD73434FF5DA" currentInboundMessages="0" inboundMessagesReceived="0" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> <KnownRemoteQueuePoint me="cluster1.000-Bus1" meUUID="C96051A1F0F91AB3" currentInboundMessages="0" inboundMessagesReceived="0" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> </QueuePoints> <RemoteQueuePoints> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_122AAD73434FF5DA@Node1.server1-Bus1" remoteME="cluster1.001-Bus1" remoteMEUUID="122AAD73434FF5DA" currentOutboundMessages="0" outboundMessageSent="2" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_C96051A1F0F91AB3@Node1.server1-Bus1" remoteME="cluster1.000-Bus1" remoteMEUUID="C96051A1F0F91AB3" currentOutboundMessages="0" outboundMessageSent="2" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> </RemoteQueuePoints> <MediationPoints> </MediationPoints> <RemoteMediationPoints> </RemoteMediationPoints> <PublicationPoints> <PublicationPoint name="Default.Topic.Space@Node1.server1-Bus1" depth="10" highMessageThreshold="50000" sendAllowed="1"> <RemotePublicationPoint me="cluster1.001-Bus1" meUUID="122AAD73434FF5DA" currentInboundMessages="0" inboundMessagesReceived="0"/> <RemotePublicationPoint me="cluster1.000-Bus1" meUUID="C96051A1F0F91AB3" currentInboundMessages="0" inboundMessagesReceived="0"/> <Subscription subscriberId="MySubName1" depth="10" topics=""/> <Subscription subscriberId="MySubName2" depth="5" topics=""/> </PublicationPoint> </PublicationPoints> <BusLinks> <BusLink name="Bus1Bus2Link" foreignBus="Bus2" state="STARTED"> <LinkReceiver state="STARTED" me="Node1.server1-Bus2" meUUID="B04215B7389FDA8F" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="3" timeSinceLastMessageReceived="19311ms" /> <LinkReceiver state="STARTED" me="Node1.server1-Bus2" meUUID="B04215B7389FDA8F" receiverType="PUBLICATION" topicSpace="" currentInboundMessages="0" messagesReceived="0" /> <LinkTransmitter state="STARTED" linkType="SIBVirtualGatewayLink" transmitterType="QUEUE" sendAllowed="1" currentOutboundMessages="0" messagesSent="4" timeSinceLastMessageSent="20435ms"/> </BusLink> </BusLinks> <WMQLinks> </WMQLinks> </MessagingEngine> <MessagingEngine name="cluster1.000-Bus1" uuid="C96051A1F0F91AB3" state="Started" activeServer="clusServer1"> <QueuePoints> <QueuePoint name="_PSIMP.TDRECEIVER_C96051A1F0F91AB3@cluster1.000-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_SYSTEM.Exception.Destination.cluster1.000-Bus1@cluster1.000-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PTRM_C96051A1F0F91AB3@cluster1.000-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PSIMP.PROXY.QUEUE_C96051A1F0F91AB3@cluster1.000-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="cluster1.001-Bus1" meUUID="122AAD73434FF5DA" currentInboundMessages="0" inboundMessagesReceived="4" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> <KnownRemoteQueuePoint me="Node1.server1-Bus1" meUUID="92FF69453638CD2F" currentInboundMessages="0" inboundMessagesReceived="11" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> <QueuePoint name="Bus2WLMQueue1@cluster1.000-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> </QueuePoints> <RemoteQueuePoints> <RemoteQueuePoint name="Bus1Queue1@cluster1.000-Bus1" remoteME="Node1.server1-Bus1" remoteMEUUID="92FF69453638CD2F" currentOutboundMessages="0" outboundMessageSent="1" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_122AAD73434FF5DA@cluster1.000-Bus1" remoteME="cluster1.001-Bus1" remoteMEUUID="122AAD73434FF5DA" currentOutboundMessages="0" outboundMessageSent="4" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_92FF69453638CD2F@cluster1.000-Bus1" remoteME="Node1.server1-Bus1" remoteMEUUID="92FF69453638CD2F" currentOutboundMessages="0" outboundMessageSent="11" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> </RemoteQueuePoints> <MediationPoints> </MediationPoints> <RemoteMediationPoints> </RemoteMediationPoints> <PublicationPoints> <PublicationPoint name="Default.Topic.Space@cluster1.000-Bus1" depth="0" highMessageThreshold="50000" sendAllowed="1"> <Subscription subscriberId="MySubName3" depth="0" topics=""/> </PublicationPoint> </PublicationPoints> <BusLinks> <BusLink name="Bus1:Bus2" foreignBus="Bus2"> <LinkTransmitter state="STOPPED" linkType="SIBVirtualGatewayLink" transmitterType="QUEUE" sendAllowed="1" currentOutboundMessages="0" messagesSent="1" timeSinceLastMessageSent="3471037ms"/> </BusLink> </BusLinks> <WMQLinks> </WMQLinks> </MessagingEngine> <MessagingEngine name="cluster1.001-Bus1" uuid="122AAD73434FF5DA" state="Started" activeServer="clusServer2"> <QueuePoints> <QueuePoint name="_PSIMP.TDRECEIVER_122AAD73434FF5DA@cluster1.001-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PSIMP.PROXY.QUEUE_122AAD73434FF5DA@cluster1.001-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"> <KnownRemoteQueuePoint me="Node1.server1-Bus1" meUUID="92FF69453638CD2F" currentInboundMessages="0" inboundMessagesReceived="12" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> <KnownRemoteQueuePoint me="cluster1.000-Bus1" meUUID="C96051A1F0F91AB3" currentInboundMessages="0" inboundMessagesReceived="2" currentMessageRequests="0" completedMessageRequests="0" messageRequestsReceived="0"/> </QueuePoint> <QueuePoint name="_SYSTEM.Exception.Destination.cluster1.001-Bus1@cluster1.001-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="Bus2WLMQueue1@cluster1.001-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> <QueuePoint name="_PTRM_122AAD73434FF5DA@cluster1.001-Bus1" state="ACTIVE" depth="0" highMessageThreshold="50000" sendAllowed="1"/> </QueuePoints> <RemoteQueuePoints> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_92FF69453638CD2F@cluster1.001-Bus1" remoteME="Node1.server1-Bus1" remoteMEUUID="92FF69453638CD2F" currentOutboundMessages="0" outboundMessageSent="12" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> <RemoteQueuePoint name="Bus1Queue1@cluster1.001-Bus1" remoteME="Node1.server1-Bus1" remoteMEUUID="92FF69453638CD2F" currentOutboundMessages="0" outboundMessageSent="1" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> <RemoteQueuePoint name="_PSIMP.PROXY.QUEUE_C96051A1F0F91AB3@cluster1.001-Bus1" remoteME="cluster1.000-Bus1" remoteMEUUID="C96051A1F0F91AB3" currentOutboundMessages="0" outboundMessageSent="2" currentMessageRequests="0" completedMessageRequests="0" messageRequestsIssued="0"/> </RemoteQueuePoints> <MediationPoints> </MediationPoints> <RemoteMediationPoints> </RemoteMediationPoints> <PublicationPoints> <PublicationPoint name="Default.Topic.Space@cluster1.001-Bus1" depth="0" highMessageThreshold="50000" sendAllowed="1"> <Subscription subscriberId="MySubName4" depth="0" topics=""/> </PublicationPoint> </PublicationPoints> <BusLinks> <BusLink name="Bus1:Bus2" foreignBus="Bus2"> <LinkTransmitter state="STOPPED" linkType="SIBVirtualGatewayLink" transmitterType="QUEUE" sendAllowed="1" currentOutboundMessages="0" messagesSent="1" timeSinceLastMessageSent="3471168ms"/> </BusLink> </BusLinks> <WMQLinks> </WMQLinks> </MessagingEngine> </Bus> </SIBusSummary> |
3. What is the status of my messaging engine? Where is my messaging engine running?
You can run the display_me_status.py script to determine the status and location of the messaging engine.
Script:
display_me_status.py script - display_me_status.zip
Sample Output:
View using SIBus MBeans: ME:sibcluster.000-TestBus Process:mem1 node: XXXNode01 State: Started View of HAManager on server2 (coregroup:DefaultCoreGroup): |
4. How do I delete messages from a SIB destination?
You can run the deleteallmessages.py script to delete all the messages from a SIB destination in one go.
Script:
deleteallmessages.py script - deleteallmessages.zip
Note: Replace the messaging engine name and queuename in the script with the messaging engine name and queuename in your environment.
5. How can I check the status of my MDB activation specifications?
You can run the display_actspec_status.py to get the status of all the activation specifications in your environment.
A return code of "1", indicates the message endpoint is active.
A return code of "2", indicates the message endpoint is inactive.
A return code of "3", indicates the message endpoint is stopped.
Script:
display_actspec_status.py script - display_actspec_status.zip
Sample Output:
[WebSphere:name=PhilMDB#PhilMDBEJB.jar#PhilMDB_J2CMessageEndpoint,process=server MDB: PhilMDB#PhilMDBEJB.jar#PhilMDB status: 1 |
6. Is it possible to display the message details of JMS messages?
You can run the display_messagedetails.py script to get the details of JMS messages on the SIB destination. The script displays details (inc. UUID and XID) of all messages on all local and remote queue points, for all messaging engines known to the wsadmin console.
Warning: As is, this may be very slow to run if there are a large number of messages on a queue. Possible modifications include only listing the details of messages in LOCKED state, only listing the first N messages on the queue, or extending/reducing the msg details printed.
Script:
display_messagedetails.py script - display_messagedetails_3.zip
Sample Output:
QUEUEPOINT(_PTRM_6157A565EB23EC34) ME(XXXode01.server1-TestBus) DEP TH(0) STATE(ACTIVE) QUEUEPOINT(ClusterQ) ME(sibcluster.000-TestBus) DEPTH(10) STATE(ACTIVE) MSG_UUID(5349199C5213014B_1500008) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:46:07) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500009) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:47:07) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500010) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:47:09) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500011) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:47:11) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500012) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:47:13) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500013) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:48:07) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500014) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:48:11) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500015) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:48:15) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500016) APPROXLEN(629) REL(AssuredPersistent) TIME(M on Jan 30 19:48:19) STATE(UNLOCKED) XID() MSG_UUID(5349199C5213014B_1500017) APPROXLEN(631) REL(AssuredPersistent) TIME(M on Jan 30 19:48:24) STATE(UNLOCKED) XID() QUEUEPOINT(83DADABDCA327664A15063C4_QUEUE_3000009) ME(sibcluster.000-TestBus) DE PTH(0) STATE(ACTIVE) QUEUEPOINT(_PSIMP.TDRECEIVER_5349199C5213014B) ME(sibcluster.000-TestBus) DEPTH( 0) STATE(ACTIVE) QUEUEPOINT(_SYSTEM.Exception.Destination.sibcluster.000-TestBus) ME(sibcluster.0 00-TestBus) DEPTH(0) STATE(ACTIVE) QUEUEPOINT(_PSIMP.PROXY.QUEUE_5349199C5213014B) ME(sibcluster.000-TestBus) DEPTH (0) STATE(ACTIVE) QUEUEPOINT(_PTRM_5349199C5213014B) ME(sibcluster.000-TestBus) DEPTH(0) STATE(ACT IVE) QUEUEPOINT(_PSIMP.PROXY.QUEUE_6157A565EB23EC34) ME(XXXNode01.server1-TestBus) DEPTH(0) STATE(ACTIVE) QUEUEPOINT(philQueue) ME(XXXNode01.server1-TestBus) DEPTH(0) STATE(ACTIVE) QUEUEPOINT(_SYSTEM.Exception.Destination.XXXode01.server1-TestBus) ME(XXXode01.server1-TestBus) DEPTH(0) STATE(ACTIVE) QUEUEPOINT(_PSIMP.TDRECEIVER_6157A565EB23EC34) ME(XXXode01.server1- TestBus) DEPTH(0) STATE(ACTIVE) REMOTEQUEUEPOINT(_PSIMP.TDRECEIVER_6157A565EB23EC34) ME(XXXode01.se rver1-TestBus) REMOTE_ME(5349199C5213014B) REMOTEQUEUEPOINT(_PSIMP.TDRECEIVER_6157A565EB23EC34) ME(XXXode01.se rver1-TestBus) REMOTE_ME(6157A565EB23EC34) REMOTEQUEUEPOINT(_PSIMP.TDRECEIVER_6157A565EB23EC34) ME(XXXode01.se rver1-TestBus) REMOTE_ME(298A60343136E14B) REMOTEQUEUEPOINT(_PSIMP.TDRECEIVER_6157A565EB23EC34) ME(XXXode01.se rver1-TestBus) REMOTE_ME(6157A565EB23EC34) STREAM(AssuredPersistent:0) STATE(Active) ACTIVEMSGS(0) |
7.How do I enable a trace string on all running servers in the environment?
You can run the setTraceOnAllServers.py script to enable a given trace string,along with a large trace buffer, on all servers in an environment.
Please note only the runtime trace setting is affected. If any server is restarted, it will revert to the trace string from the configuration.
Script:
setTraceOnAllServers.py script - setTraceOnAllServers.zip
Usage:
DMGRPROFILE/wsadmin.sh -lang jython -f setTraceOnAllServers.py <TRACESETTING> [COUNT] [SIZE] [FORMAT] [FILENAME]
COUNT/SIZE/FORMAT/FILENAME are all optional. Defaults to 5x50MB Basic trace.
Note:The trace files are created in the WAS_PROFILE_ROOT/logs/<yourserver> directory of the server.
Example 1 - enabling SIBus runtime trace:
DMGRPROFILE/wsadmin.sh -lang jython -f setTraceOnAllServers.py SIBProcessor=all:SIBMessageStore=all:SIBMessageTrace*=all:SIBCommunications=all
Example 2 - disabling all runtime trace:
DMGRPROFILE/wsadmin.sh -lang jython -f setTraceOnAllServers.py *=info
8.How do I generate javacores for every server in the environment?
You can run requestJavacoresFromAllServers.py script to request a javacore to be dumped by all servers in an environment(excluding the nodeagents
and deployment manager).
Script:
requestJavacoresFromAllServers.py script - requestJavacoresFromAllServers.zip
Usage:
DMGRPROFILE/wsadmin.sh -lang jython -f requestJavacoresFromAllServers.py
Note:The javacores are created in the WAS_PROFILE_ROOT directory.
Resources:
wsadminScripts.zip - contains all of the scripts mentioned in this blog entry
Disclaimer:
THE DOWNLOAD(S) ARE PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF PATENTS, COPYRIGHTS OR OTHER PROPRIETARY RIGHTS OF OTHERS. NEITHER THE AUTHOR NOR IBM WARRANT THAT THE FUNCTIONS, ROUTINES, AND DATA CONTAINED IN, OR GENERATED AS A RESULT OF THE DOWNLOAD(S), WILL MEET YOUR REQUIREMENTS OR BE ERROR-FREE. The entire risk related to the quality and performance of the download(s) and sample(s) is with you. In the event that there is any defect, you assume the entire cost of all necessary services, repair or correction. IN NO EVENT WILL THE AUTHOR OR IBM BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY DIRECT OR INDIRECT DAMAGES (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES) ARISING OUT OF THE USE OR INABILITY TO USE THE DOWNLOAD(S), EVEN IF THE AUTHOR OR IBM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Some jurisdictions do not allow the exclusion of implied warranties or the limitation or exclusion of liability for incidental or consequential damages, so some of the above may not apply to you."
UID
ibm11080303