What logs look like

Logs consist of primary and secondary files, and a control file. You define the number and size of log files and where they are stored in the file system.

An IBM MQ log consists of two components:
  1. One or more files of log data.
  2. A log control file

A file of log data is also known as a log extent.

There are a number of log extents that contain the data being recorded. We can define the number and size (as explained in LogDefaults stanza of the mqs.ini file), or take the system default of three primary and two secondary extents.

Each of the three primary and two secondary extents defaults to 16 MB.

When creating a queue manager, the number of log extents pre-allocated is the number of primary log extents allocated. If we do not specify a number, the default value is used.

IBM MQ uses two types of logging:

  • Circular
  • Linear

    The number of log extents used with linear logging can be very large, depending on the frequency of our media image recording.

See Types of logging for more information.

In IBM MQ for Windows, if you have not changed the log path, log extents are created under the directory:
C:\ProgramData\IBM\MQ\log\QMgrName
In IBM MQ for UNIX and Linux systems, if you have not changed the log path, log extents are created under the directory:
/var/mqm/log/QMgrName

IBM MQ starts with these primary log extents, but if the primary log space is not sufficient, it allocates secondary log extents. It does this dynamically and removes them when the demand for log space reduces. By default, up to two secondary log extents can be allocated. We can change this default allocation, as described in Change IBM MQ and queue manager configuration information.

Log extents are prefixed with either the letter S or the letter R. Active, inactive, and superfluous extents are prefixed with S, whereas reuse extents are prefixed with R.

When backing up or restoring your queue manager, back up and restore all the active, inactive, and superfluous extents, along with the log control file.Note: You do not need to back up and restore reuse extents.

  • The log control file
    The log control file contains information needed to describe the state of log extents, such as their size and location and the name of the next available extent.

Parent topic: Logging: Making sure that messages are not lost