]> git.sur5r.net Git - openldap/blob - doc/guide/admin/runningslapd.sdf
Additional format changes
[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 {{I:Slapd}} supports the following command-line options.
15
16 E: -d <level> | ?
17
18 This option sets the slapd debug level to <level>. When level is a
19 `?' character, the various debugging levels are printed and slapd
20 exits, regardless of any other options you give it. Current
21 debugging levels are
22
23 E:     1 trace function calls
24 E:     2 debug packet handling
25 E:     4 heavy trace debugging
26 E:     8 connection management
27 E:    16 print out packets sent and received
28 E:    32 search filter processing
29 E:    64 configuration file processing
30 E:   128 access control list processing
31 E:   256 stats log connections/operations/results
32 E:   512 stats log entries sent
33 E:  1024 print communication with shell backends
34 E:  2048 print entry parsing debugging
35 E: 65535 enable all debugging
36
37 You may enable multiple levels by specifying the debug option
38 once for each desired level.  Or, since debugging levels are
39 additive, you can do the math yourself. That is, if you want
40 to trace function calls and watch the config file being
41 processed, you could set level to the sum of those two levels
42 (in this case, {{EX: -d 65}}).  Or, you can let slapd do the
43 math, (e.g. {{EX: -d 1 -d 64}}).  Consult {{EX: <ldap.h>}} for
44 more details.
45
46 Note: slapd must have been compiled with {{EX:-DLDAP_DEBUG}}
47 defined for any debugging information beyond the two stats levels
48 to be available.
49
50 E: -f <filename>
51
52 This option specifies an alternate configuration file for slapd.
53
54 E: -p <port>
55
56 This option specifies an alternate TCP port on which slapd should
57 listen for connections. The default port is 389.
58
59
60 H2: Starting slapd
61
62 In general, slapd is run like this:
63
64 E:      $(ETCDIR)/slapd [<option>]*
65
66 where ETCDIR has the value you gave in the Make-common file
67 during the pre-build configuration, and <option> is one of the
68 options described below. Unless you have specified a debugging
69 level, slapd will automatically fork and detach itself from its
70 controlling terminal and run in the background. Any of the options
71 given above can be given to slapd to point it at a different
72 configuration file, listen on another port, etc.
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 $(ETCDIR)/slapd.pid`
79
80 Killing slapd by a more drastic method may cause its LDBM
81 databases to be corrupted, as it may need to flush various buffers
82 before it exits. Note that slapd writes its pid to a file called 
83 {{EX: slapd.pid}} in the {{EX: ETCDIR}} you configured in 
84 {{EX: Make-common}}. You can change
85 the location of this pid file by changing the {{EX: SLAPD_PIDFILE}}
86 variable in {{EX: include/ldapconfig.h.edit}}.
87
88 {{I: Slapd}} will also write its arguments to a file called 
89 {{EX: slapd.args}} in the {{EX: ETCDIR}} you configured 
90 in {{EX: Make-common}}. You can change the
91 location of the args file by changing the {{EX: SLAPD_ARGSFILE}}
92 variable in {{EX: include/ldapconfig.h.edit}}.
93