mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
85 lines
2.7 KiB
Plaintext
85 lines
2.7 KiB
Plaintext
# $OpenLDAP$
|
|
# Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
|
|
# COPYING RESTRICTIONS APPLY, see COPYRIGHT.
|
|
H1: Running slapd
|
|
|
|
{{slapd}}(8) is designed to be run as a stand-alone server. This allows
|
|
the server to take advantage of caching, manage concurrency issues
|
|
with underlying databases, and conserve system resources. Running
|
|
from {{inetd}}(8) is {{NOT}} an option.
|
|
|
|
|
|
H2: Command-Line Options
|
|
|
|
{{slapd}}(8) supports a number of command-line options as detailed
|
|
in manual page. This section details a few commonly used options.
|
|
|
|
> -f <filename>
|
|
|
|
This option specifies an alternate configuration file for slapd.
|
|
The default is normally {{F:/usr/local/etc/openldap/slapd.conf}}.
|
|
|
|
|
|
> -d <level> | ?
|
|
|
|
This option sets the slapd debug level to <level>. 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
|
|
|
|
!block table; colaligns="RL"; align=Center; \
|
|
title="Table 6.1: Debugging Levels"
|
|
Level Description
|
|
-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
|
|
!endblock
|
|
|
|
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, {{EX: -d 65}}). Or, you can let slapd do the
|
|
math, (e.g. {{EX: -d 1 -d 64}}). Consult {{F: <ldap.h>}} for
|
|
more details.
|
|
|
|
Note: slapd must have been compiled with {{EX:-DLDAP_DEBUG}}
|
|
defined for any debugging information beyond the two stats levels
|
|
to be available.
|
|
|
|
|
|
H2: Starting slapd
|
|
|
|
In general, slapd is run like this:
|
|
|
|
> /usr/local/etc/libexec/slapd [<option>]*
|
|
|
|
where {{F:/usr/local/etc/libexec}} is determined by {{EX:configure}}.
|
|
and <option> is one of the options described above (or in {{slapd}}(8)).
|
|
Unless you have specified a debugging level (including level {{EX:0}}),
|
|
slapd will automatically fork and detach itself from its controlling
|
|
terminal and run in the background.
|
|
|
|
H2: Stopping slapd
|
|
|
|
To kill off slapd safely, you should give a command like this
|
|
|
|
> kill -INT `cat /usr/local/var/slapd.pid`
|
|
|
|
where {{F:/usr/local/var}} is determined by {{EX:configure}}.
|
|
|
|
Killing slapd by a more drastic method may cause its information
|
|
loss or database corruption.
|