MQLogging

download MQLogging

of 3

Transcript of MQLogging

  • 8/8/2019 MQLogging

    1/3

    Logging & LogsLogging in MQ========= => MQ log are also known as transaction logs.

    => MQ logs consists of two parts- Data log file (named S0000000.LOG - S9999999.LOG)- Control log file (named amqhlctl.lfh)

    =>Transaction logs are created when you create the Queue Manager. When you choose the defaultlocations, the logs will goes to

    - /var/mqm/logs/Queue_Manager in unix-c:/program files/IBM/log/Queue_Manager in windows

    => These MQ logs/ Transaction logs holds the following information

    - Transaction activity known as Unit Of Work- Persistant messages- Internan data about queue manager objects- Persistant channel status

    => Type of loggingMQ provides 2 type of logging options 1. Circular (default) 2. Linear Circular Logging

    - Good performance- Esay administration

    Linear logging- Media Recovery- Ability to archive/backup

    => Configuring LoggingLogging configuration will have direct effect on the performance of MQ. Some of the configurationparameters of logging can be changed after creating Queue Manager but some can not be changed. Primary Logs are the initial and minimum logs.Secondary logs can be created when the primary logs become full.

    Default minimum Max (unix) Max (Win)Primary 3 2 510 254Secondary 2 1 509 253 => Maximum of primary/secondary logs have a constraint of 511 on unix and 255 on windows platforms.These are the active logs

    => Log file size is a multiple of 4KB log file page size. This can not be changed after creating the QueueManager. => Log file size details table

    pages filesize MaxDefault Win 256 1MB 256MBDefault unix 1024 4MB 2GBMinimum Win 32 128KB 32MBMinimum Win 64 256KB 128MB

  • 8/8/2019 MQLogging

    2/3

    Maximum 65535 256MB 64GB(win)/128GB(unix) => Log buffer size specifies number of 4KB pages MQ uses to beffer log file writes.

    - Default is 128 which is specified by 0 in MQ configuration file- Minimum is 18 and maximum is 4096

    => Log write integrity is the algorithm used to ensure the integrity of the logs.- Default algorithm is triple write.- This can be changed from QM configuration file

    => Logging Configuration files

    - mqs.ini is the config file for MQ level settings- qm.ini is the config file for effective/QM lelvel settings

    Examples:

    -mqs.initLog Defaults:LogPrimaryFiles=3LogSecondaryFiles=2LogFilePages=1024LogType=CIRCULARLogBufferPages=0LogDefaultPath=/var/mqm/logs -qm.iniLogPrimaryFiles=3LogSecondaryFiles=2LogFilePages=1024LogType=CIRCULARLogBufferPages=0LogDefaultPath=/var/mqm/logsLogWriteIntegrity=TrippleWrite

    => Log Management

    - Circular logging do not need manual log management- Linear logging needs manual backup/cleaning

    => Some logging related MQ codes- AMQ7467 Old log file required for queue manager start- AMQ7468 old log file required for Queue Manager media recovery - AMQ5037 Queue manager task 'LOG-FORMAT' started- AMQ5037 Queue Manager task 'LOGGEREU' stared- AMQ5037 Queue Manager task 'LOGGER-IO' started

    => Media Recording and Recovery- Recording media imagesrcdmqimg command will record the image of the queue manager specified.

    - Recoveryis required when a powerloss/reboot/QM failure occurs

    When the recovery is performed- Queues are restored to their comitted state at the time of failure- Persistant data is not lost- non-persistant messages will be discarded

  • 8/8/2019 MQLogging

    3/3

    => Log Recovery scenarios

    - Disk FailuresIn case of circular logging, restore QM and logs from backupRebuild QM using support pac MS03In case of linear logging, restored damaged objects using rcrmqobj

    => Log recovery summary- In case of circular logging, no recovery is available- In case of linear logging, use rcrmqobj to recover/recreate the objects fron media image