Collecting a binary server trace at startup

To debug issues that are related to a failed directory server startup, you must collect a binary server trace. You can also use it to trace a specific operation at directory server startup.

Procedure

  1. Stop the directory server instance, if it is running. Issue the command of the following format: ibmslapd -I instance_name -k
  2. Determine whether tracing is enabled or not. Issue the following command: ldtrc info.
  3. If trace is enabled, disable the trace. Issue the following command: ldtrc off.
  4. Enable binary tracing. Issue the following command: ldtrc on -l 50000000

    In the command, the value for the buffer size is set to 50 million bytes. This buffer size stores the latest 50 million bytes of trace record data in the shared memory. It flushes the oldest data when the 50-MB value is reached. If the command fails because of what might seem to be insufficient shared memory resources, you can scale the number down. However, less than 20 million might not provide the required information.

  5. Start the directory server instance. Issue the command of the following format: ibmslapd -I instance_name -n.
  6. Point the environment variable TRCTFIDIR to the DS_INSTALL_HOME directory. Use the following command:
    On AIX®, and Linux™ platforms:
    $export TRCTFIDIR=DS_INSTALL_HOME/etc
    On Windows™ platform:
    C:\> set TRCTFIDIR=DS_INSTALL_HOME\etc
    where, DS_INSTALL_HOME on different operating system is as follows:
    On AIX platform:
    /opt/IBM/ldap/V10.0.4/etc
    On Linux platform:
    /opt/ibm/ldap/V10.0.4/etc
    On Windows platform:
    C:\Program Files\IBM\ldap\V10.0.4\etc
  7. Re-create the problem to produce the error or condition that you want to trace.
  8. Collect the trace records. After the error or the condition you want to trace occurs, issue the following command:
    ldtrc dump trace.raw
    where trace.raw is the path name and file name that is used to capture the records in shared memory.
  9. Change to the DS_INSTALL_HOME/etc directory and then collect the format and flow of the binary trace. Issue the following commands:ldtrc fmt trace.raw trace.fmt ldtrc flw trace.raw trace.flw. Send the trace.fmt and trace.flw files to support.
  10. Disable tracing. Issue the following command: ldtrc off