Using the LDAP_OPT_DEBUG option to trace errors
Trace problems with clients that are using the LDAP C APIs.
You can use the LDAP_OPT_DEBUG option of the ldap_set_option() API to trace problems with clients that are using the LDAP C APIs. The debug option has multiple debug level setting that you can use to aid in troubleshooting problems with these applications.
The following is an example of enabling the client trace debug option.
int debugvalue= LDAP_DEBUG_TRACE | LDAP_DEBUG_PACKETS; ldap_set_option( 1d, LDAP_OPT_DEBUG, &debugvalue);An alternate way of setting the debug level is to configure the numerical value of the LDAP_DEBUG environment variable, for the job in which the client application runs, to the same numerical value that the debugvalue would be if the ldap_set_option() API is used.
An example of enabling the client trace using the LDAP_DEBUG environment variable is the following:
ADDENVVAR ENVVAR(LDAP_DEBUG) VALUE(0x0003)After running the client that produces the problem you are having, type the following on the command line:
DMPUSRTRC ClientJobNumberwhere ClientJobNumber is the number of the client job. To display this information interactively, type the following at the command line:
DSPPFM QAP0ZDMP QP0Znnnnnnwhere QAP0ZDMP contains a zero and nnnnnn is the job number.To save this information in order to send the information to service, take the following steps:
- Create a SAVF file using the create SAVF (CRTSAVF) command.
- Type the following at the command line.
SAVOBJ OBJ(QAP0ZDMP) LIB(QTEMP) DEV(*SAVF) SAVF(xxx)where QAP0ZDMP contains a zero and xxx is the name that you specified for the SAVF file.
Parent topic:
Troubleshooting Directory Server
Related concepts
Lightweight Directory Access Protocol (LDAP) APIs
Related information
Add Environment Variable (ADDENVVAR)
Dump User Trace (DMPUSRTRC)
Display Physical File Member (DSPPFM)
Create Save File (CRTSAVF)
Save Object (SAVOBJ)