ldtrc

Use the ldtrc command to run various trace options on a system.

Description

You can run the tracing utility, ldtrc, to activate or deactivate tracing of a directory server. You can use the trace options that are provided with the command to troubleshoot the instance-specific issues. To see syntax help for ldtrc, run the ldtrc -? command.

Note: For format and flow options, you must set the TRCTFIDIR environment variable to the directory that contains the Trace Facility Information files(*.tfi).

Synopsis

ldtrc (chg|clr|dmp|flw|fmt|inf|off|on) options

Options

The ldtrc command takes the following parameters.
chg | change
The trace must be active before you can use the chg parameter to change the values for the following options.
  • [-m <mask>]: where, <mask> = <products>.<events>.<components>.<classes>.<functions>
  • [-p <pid>[.<tid>]]: Traces only the specified process or thread.
  • [-c <cpid>]: Traces only the specified companion process.
  • [-e <maxSeverErrors>]: Stops tracing after the maximum number of server errors (maxSevereErrors) is reached.
  • [-this <thisPointer>]: Traces only the specified object.
clr | clear
Clears the existing trace buffer.
dmp | dump
Dumps the trace information to a file. This information includes process flow data and server debug messages. You can specify the name of the destination file where you want to dump the trace. The default location fro the files is listed.
For AIX®, Linux®, and Solaris systems
/var/ldap/ibmslapd.trace.dump
For Windows systems:
installation_path\var\ibmslapd.trace.dump
Note: This file contains binary ldtrc data that must be formatted with the ldtrc format command.
flw | flow
  • [-m <mask>]: where <mask> = <products>.<events>.<components>.<classes>.<functions>
  • [-p <pid>[.<tid>]]: Shows control flow only for the specified process or thread.
  • [-r ]: Specifies to output trace in reverse chronological order.
  • [-x <onlyRecord> | <firstRecord> - <lastRecord>]: Shows the control flow only for the specified record or shows the control flow between the specified first and last records.
  • [-this <thisPointer>]: Traces only the specified object.
  • [<sourceFile> [<destFile>]: Specifies the trace file to format and the destination file for the formatted output.
fmt | format
  • [-m <mask>] where <mask> = <products>.<events>.<components>.<classes>.<functions>
  • [-p <pid>[.<tid>]]: Specifies to format trace records that belong to a process or thread.
  • [-j ]: Specifies to join the first two lines of the trace output.
  • [-r ]: Specifies to output trace in reverse chronological order.
  • [-x <onlyRecord> | <firstRecord> - <lastRecord>]: Shows the control flow only for the specified record or shows the control flow between the specified first and last records.
  • [-this <thisPointer>]: Traces only the specified object.
  • [<sourceFile> [<destFile>]: Specifies the trace file to format and the destination file for the formatted output.
inf | info | information
[<sourceFile> [<destFile>]: Gets the information about the trace. You must specify the source file that can be a binary trace file or trace buffer (if file is "-") and a destination file. The following example shows information that the info parameter generated.
C:\>ldtrc info
Trace Version:1.00
Op. System:NT
Op. Sys. Version:4.0
H/W Platform:80x86

Mask: *.*.*.*.*.*
pid.tid to trace: all
cpidto trace: all
this pointer to trace: all
Treat this rc as sys err: none
Max severe errors: 1
Max record size: 32768 bytes
Trace destination: shared memory
Records to keep: last
Trace buffer size: 1048576 bytes
Trace data pointer check: no
on
Activates the tracing facility. You can specify any of the following options.
  • [-m <mask>] where, <mask> = <products>.<events>.<components>.<classes>.<functions>
  • [-p <pid>[.<tid>]]: Traces only the specified process or thread.
  • [-c <cpid>]: Traces only the specified companion process.
  • [-e <maxSeverErrors>]: Stops tracing after the maximum number of server errors (maxSevereErrors) is reached.
  • [-s | -f <fileName>]: Sends the output to shared memory or a file.
  • [-l [<bufferSize>] | -i [<bufferSize>]]: Specifies to retain the last or the initial records. The default buffer is 1M.
  • [-this <thisPointer>]: Traces only the specified object.
  • [-perf]: Traces only performance records.
Note: The tracing utility must be on for server data to be traced.
off
Turns off the tracing facility.

Examples

Example 1:
To turn on the trace facility, run the following command:
ldtrc on 
Example 2:
To turn off the trace facility, run the following command:
ldtrc off