mlogchk


The mlogchk command performs consistency checks on the persistency directory installationDirectory/pw/server/varcellName. This directory could be in an inconsistent state after abnormal cell or StateBuilder termination. It is an interactive tool that tells the operator what is wrong and what must be corrected.

You must shut down the cell before running the checks because a running cell might modify the log directory during a check.

The mlogchk command does the following:

  • Determines whether an mcdb.lock file exists and, if so
    • Checks for a running statbld and waits for termination 
    • Reports the trailing lock file and removes it (after confirmation) 
  • Determines whether an xact.1 file exists and, if so, reports and instructs the user to run statbld 
  • Determines whether an mcdb.0 file exists and, if so, reports and proposes to rename or remove it

mlogchk syntax

The following figure shows the syntax for mlogchk.

mlogchk syntax

mlogchk [-h|?] [-z] [-q] [-c <ConfigFile>] {-p <Var Value>} [-n <cellName> | -n @Host[/Port[#Key]]] [-l <HomeLocation>] [-v]

No command-specific options exist for mlogchk.

mlogchk example

The following figure shows an example of mlogchk.

Example of mlogchk

mlogchk -n spud -v

For a cell named spud, the preceding command produces output similar to the example shown in the following figure:

Output of mlogchk

Warning: Cell spud is running - this may influence the consistency check.
To ensure correct results, you should shutdown the Cell now.
Do you want to continue (y/n)

The output continues with the message shown in the following figure if you respond with y.

mlogchk message

No inconsistency found.

mlogchk return codes

The following figure lists the command-specific return codes for mlogchk. For a list of common return codes that apply to all CLI commands, see Event-management-return-codes.

mlogchk return codes

Code

Description

21

Cannot access cell log directory

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*