Dumping the contents of the log using the dmpmqlog command
How to use the dmpmqlog command to dump the contents of the queue manager log.
Use the dmpmqlog command to dump the contents of the queue manager log. By default all active log records are dumped, that is, the command starts dumping from the head of the log (usually the start of the last completed checkpoint).
- Start dumping from the base of the log. The base of the log is the first log record in the log file that contains the head of the log. The amount of additional data dumped in this case depends on where the head of the log is positioned in the log file. If it is near the start of the log file, only a small amount of additional data is dumped. If the head is near the end of the log file, significantly more data is dumped.
- Specify the start position of the dump as an individual log record.
Each log record is identified by a unique log sequence number (LSN). In the case of circular logging, this starting log record cannot
be before the base of the log; this restriction does not apply to
linear logs. You might need to reinstate inactive log files before
running the command. You must specify a valid LSN, taken from previous dmpmqlog output, as the start position.
For example, with linear logging you can specify the
nextlsn
from your last dmpmqlog output. Thenextlsn
appears inLog File Header
and indicates the LSN of the next log record to be written. Use this as a start position to format all log records written since the last time the log was dumped. - For linear logs only, you can instruct dmpmqlog to start formatting log records from any given log file extent. In this case, dmpmqlog expects to find this log file, and each successive one, in the same directory as the active log files. This option does not apply to circular logs, where dmpmqlog cannot access log records prior to the base of the log.
The output from the dmpmqlog command is the Log File Header
and a series of
formatted log records. The queue manager uses several log records
to record changes to its data.
Some of the information that is formatted is only of use internally. The following list includes the most useful log records:
- Log File Header
- Each log has a single log file header, which is always the first
thing formatted by the dmpmqlog command.
It contains the following fields:
logactive The number of primary log extents. loginactive The number of secondary log extents. logsize The number of 4 KB pages per extent. baselsn The first LSN in the log extent containing the head of the log. nextlsn The LSN of the next log record to be written. headlsn The LSN of the log record at the head of the log. tailsn The LSN identifying the tail position of the log. hflag1 Whether the log is CIRCULAR or LOG RETAIN (linear). HeadExtentID The log extent containing the head of the log. - Log Record Header
- Each log record within the log has a fixed header containing the
following information:
LSN The log sequence number. LogRecdType The type of the log record. XTranid The transaction identifier associated with this log record (if any). A
TranType
of MQI indicates a WebSphere® MQ-only transaction. ATranType
of XA is involved with other resource managers. Updates involved within the same unit of work have the sameXTranid
.QueueName The queue associated with this log record (if any). Qid The unique internal identifier for the queue. PrevLSN The LSN of the previous log record within the same transaction (if any). - Start Queue Manager
- This logs that the queue manager has started.
StartDate The date that the queue manager started. StartTime The time that the queue manager started. - Stop Queue Manager
- This logs that the queue manager has stopped.
StopDate The date that the queue manager stopped. StopTime The time that the queue manager stopped. ForceFlag The type of shutdown used. - Start Checkpoint
- This denotes the start of a queue manager checkpoint.
- End Checkpoint
- This denotes the end of a queue manager checkpoint.
ChkPtLSN The LSN of the log record that started this checkpoint. - Put Message
- This logs a persistent message put to a queue. If the message
was put under sync point, the log record header contains a non-null
XTranid
. The remainder of the record contains:MapIndex An identifier for the message on the queue. It can be used to match the corresponding MQGET that was used to get this message from the queue. In this case a subsequent Get Message
log record can be found containing the sameQueueName
andMapIndex
. At this point theMapIndex
identifier can be reused for a subsequent put message to that queue.Data Contained in the hex dump for this log record is various internal data followed by the Message Descriptor (eyecatcher MD) and the message data itself. - Put Part
- Persistent messages that are too large for a single log record are logged as multiple
Put Part
log records followed by a singlePut Message
record. If there arePut Part
records, then the PrevLSN field will chain thePut Part
records and the finalPut Message
record together.Data Continues the message data where the previous log record left off. - Get Message
- Only gets of persistent messages are logged. If the message was
got under sync point, the log record header contains a non-null
XTranid
. The remainder of the record contains:MapIndex Identifies the message that was retrieved from the queue. The most recent Put Message
log record containing the sameQueueName
andMapIndex
identifies the message that was retrieved.QPriority The priority of the message retrieved from the queue. - Start Transaction
- Indicates the start of a new transaction. A TranType of MQI indicates
a WebSphere MQ-only transaction. A TranType
of XA indicates one that involves other resource managers. All updates
made by this transaction will have the same
XTranid
. - Prepare Transaction
- Indicates that the queue manager is prepared to commit the updates
associated with the specified
XTranid
. This log record is written as part of a two-phase commit involving other resource managers. - Commit Transaction
- Indicates that the queue manager has committed all updates made by a transaction.
- Rollback Transaction
- This denotes the queue manager's intention to roll back a transaction.
- End Transaction
- This denotes the end of a rolled-back transaction.
- Transaction Table
- This record is written during sync point. It records the state
of each transaction that has made persistent updates. For each transaction
the following information is recorded:
XTranid The transaction identifier. FirstLSN The LSN of the first log record associated with the transaction. LastLSN The LSN of the last log record associated with the transaction. - Transaction Participants
- This log record is written by the XA Transaction Manager component
of the queue manager. It records the external resource managers that
are participating in transactions. For each participant the following
is recorded:
RMName The name of the resource manager. RMID The resource manager identifier. This is also logged in subsequent Transaction Prepared
log records that record global transactions in which the resource manager is participating.SwitchFile The switch load file for this resource manager. XAOpenString The XA open string for this resource manager. XACloseString The XA close string for this resource manager. - Transaction Prepared
- This log record is written by the XA Transaction Manager component
of the queue manager. It indicates that the specified global transaction
has been successfully prepared. Each of the participating resource
managers will be instructed to commit. The
RMID
of each prepared resource manager is recorded in the log record. If the queue manager itself is participating in the transaction aParticipant Entry
with anRMID
of zero will be present. - Transaction Forget
- This log record is written by the XA Transaction Manager component
of the queue manager. It follows the
Transaction Prepared
log record when the commit decision has been delivered to each participant. - Purge Queue
- This logs the fact that all messages on a queue have been purged, for example, using the MQSC command CLEAR QUEUE.
- Queue Attributes
- This logs the initialization or change of the attributes of a queue.
- Create Object
- This logs the creation of a WebSphere MQ object.
ObjName The name of the object that was created. UserId The user ID performing the creation. - Delete Object
- This logs the deletion of a WebSphere MQ object.
ObjName The name of the object that was deleted.