]> git.sur5r.net Git - openldap/blob - doc/guide/admin/runningslapd.sdf
8bd442add0048ef758d557d62a9f48cd6bc63873
[openldap] / doc / guide / admin / runningslapd.sdf
1 # $OpenLDAP$
2 # Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
3 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
4 H1: Running slapd
5
6 {{slapd}}(8) is designed to be run as a stand-alone server.  This allows
7 the server to take advantage of caching, manage concurrency issues
8 with underlying databases, and conserve system resources.  Running
9 from {{inetd}}(8) is {{NOT}} an option.
10
11
12 H2: Command-Line Options
13
14 {{slapd}}(8) supports a number of command-line options as detailed
15 in manual page.  This section details a few commonly used options.
16
17 E: -f <filename>
18
19 This option specifies an alternate configuration file for slapd.
20 The default is normally {{F:/usr/local/etc/openldap/slapd.conf}}.
21
22
23 E: -d <level> | ?
24
25 This option sets the slapd debug level to <level>. When level is a
26 `?' character, the various debugging levels are printed and slapd
27 exits, regardless of any other options you give it. Current
28 debugging levels are
29
30 !block table; colaligns="RL"; align=Center; title="Table 6.1: Debugging Levels"
31 Level   Description
32 -1      enable all debugging
33 0       no debugging
34 1       trace function calls
35 2       debug packet handling
36 4       heavy trace debugging
37 8       connection management
38 16      print out packets sent and received
39 32      search filter processing
40 64      configuration file processing
41 128     access control list processing
42 256     stats log connections/operations/results
43 512     stats log entries sent
44 1024    print communication with shell backends
45 2048    print entry parsing debugging
46 !endblock
47
48 You may enable multiple levels by specifying the debug option
49 once for each desired level.  Or, since debugging levels are
50 additive, you can do the math yourself. That is, if you want
51 to trace function calls and watch the config file being
52 processed, you could set level to the sum of those two levels
53 (in this case, {{EX: -d 65}}).  Or, you can let slapd do the
54 math, (e.g. {{EX: -d 1 -d 64}}).  Consult {{F: <ldap.h>}} for
55 more details.
56
57 Note: slapd must have been compiled with {{EX:-DLDAP_DEBUG}}
58 defined for any debugging information beyond the two stats levels
59 to be available.
60
61
62 H2: Starting slapd
63
64 In general, slapd is run like this:
65
66 E:      /usr/local/etc/libexec/slapd [<option>]*
67
68 where {{F:/usr/local/etc/libexec}} is determined by {{EX:configure}}.
69 and <option> is one of the options described above (or in {{slapd}}(8)).
70 Unless you have specified a debugging level (including level {{EX:0}}),
71 slapd will automatically fork and detach itself from its controlling
72 terminal and run in the background.
73
74 H2: Stopping slapd
75
76 To kill off slapd safely, you should give a command like this
77
78 E:      kill -TERM `cat /usr/local/var/slapd.pid`
79
80 where {{F:/usr/local/var}} is determined by {{EX:configure}}.
81
82 Killing slapd by a more drastic method may cause its information
83 loss or database corruption.