With a little side of applesauce...

Sunday, January 28, 2007

ldap-utils - debugging values

https://launchpad.net/distros/ubuntu/+source/openldap2.3/+bug/74754 Binary package hint: ldap-utils

When trying to debug some ldif syntax information with ldapadd, I found that -d debuglevel is defined in the man page, but the debuglevels are not defined. I found the following page:
http://www.linuxselfhelp.com/HOWTO/LDAP-HOWTO-4.html

Which defines the debuglevels which are available for ldap-utils utilities, (ldapadd, ldapmodify, etc.).

Could we get this information added to the man pages for these utils? I can do it myself if someone can verify that the following information is correct for our version of ldap-utils:

ii ldap-utils 2.2.26-5ubuntu

-d | ?

This option sets the slapd debug level to . When level is a `?’
character, the various debugging levels are printed and slapd exits, regardless
of any other options you give it. Current debugging levels are:

-1 enable all debugging
0 no debugging
1 trace function calls
2 debug packet handling
4 heavy trace debugging
8 connection management
16 print out packets sent and received
32 search filter processing
64 configuration file processing
128 access control list processing
256 stats log connections/operations/results
512 stats log entries sent
1024 print communication with shell backends
2048 print entry parsing debugging

You may enable multiple levels by specifying the debug option once for each
desired level. Or, since debugging levels are additive, you can do the math
yourself. That is, if you want to trace function calls and watch the config
file being processed, you could set level to the sum of those two levels (in
this case, -d 65). Or, you can let slapd do the math, (e.g. -d 1 -d 64).
Consult for more details.

Note: slapd must have been compiled with -DLDAP_DEBUG defined for any debugging
information beyond the two stats levels to be available.

BTW, ldap-utils on ubuntu _is_ compiled with LDAP_DEBUG.

1 comment:

speeves said...

Here is another good listing of values, plus global directives for slapd.conf:

http://www.yolinux.com/TUTORIALS/LinuxTutorialLDAP-SLAPD-LDIF-V2-config.html