1SEARCHD(1)                       Sphinxsearch                       SEARCHD(1)
2
3
4

NAME

6       searchd - Sphinxsearch network daemon.
7

SYNOPSIS

9       searchd [--config CONFIGFILE] [--cpustats] [--iostats] [--index INDEX]
10               [--port PORT]
11
12       searchd --status [--config CONFIGFILE] [--pidfile PIDFILE]
13
14       searchd --stop [--config CONFIGFILE] [--pidfile PIDFILE]
15

DESCRIPTION

17       Sphinx is a collection of programs that aim to provide high quality
18       fulltext search.
19
20       Searchd is the second of the two principle tools as part of Sphinx.
21       searchd is the part of the system which actually handles searches; it
22       functions as a server and is responsible for receiving queries,
23       processing them and returning a dataset back to the different APIs for
24       client applications.
25
26       Unlike indexer, searchd is not designed to be run either from a regular
27       script or command-line calling, but instead either as a daemon to be
28       called from init.d (on Unix/Linux type systems) or to be called as a
29       service (on Windows-type systems). so not all of the command line
30       options will always apply, and so will be build-dependent.
31

OPTIONS

33       These programs follow the usual GNU command line syntax, with long
34       options starting with two dashes (`-').
35
36       The options available to searchd on all builds are:
37
38       --configCONFIGFILE, -cCONFIGFILE
39           Tell searchd to use the given file as its configuration, just as
40           with indexer.
41
42       --console
43           Force searchd into console mode; typically it will be running as a
44           conventional server application, and will aim to dump information
45           into the log files (as specified in sphinx.conf). Sometimes though,
46           when debugging issues in the configuration or the daemon itself, or
47           trying to diagnose hard-to-track-down problems, it may be easier to
48           force it to dump information directly to the console/command line
49           from which it is being called. Running in console mode also means
50           that the process will not be forked (so searches are done in
51           sequence) and logs will not be written to. (It should be noted that
52           console mode is not the intended method for running searchd.)
53
54           You can invoke it as such:
55
56               $ searchd --config /home/myuser/sphinx.conf --console
57
58       --cpustats
59           Used to provide actual CPU time report (in addition to wall time)
60           in both query log file (for every given query) and status report
61           (aggregated). It depends on clock_gettime() system call and might
62           therefore be unavailable on certain systems.
63
64           You might start searchd thus:
65
66               $ searchd --config /home/myuser/sphinx.conf --cpustats
67
68       --help, -h, --?, -?
69           List all of the parameters that can be called in your particular
70           build of searchd.
71
72       --index INDEX, -i INDEX
73           Serve only the specified index. Like --port, this is usually for
74           debugging purposes; more long-term changes would generally be
75           applied to the configuration file itself.
76
77           Usage example:
78
79               $ searchd --index myindex
80
81       --iostats
82           Used in conjuction with the logging options (the query_log will
83           need to have been activated in sphinx.conf) to provide more
84           detailed information on a per-query basis as to the input/output
85           operations carried out in the course of that query, with a slight
86           performance hit and of course bigger logs. Further details are
87           available under the query log format section.
88
89           You might start searchd thus:
90
91               $ searchd --config /home/myuser/sphinx.conf --iostats
92
93       --listen, -l ( address ":" port | port | path ) [ ":" protocol ]
94           Works as --port, but allow you to specify not only the port, but
95           full path, as IP address and port, or Unix-domain socket path, that
96           searchd will listen on. Otherwords, you can specify either an IP
97           address (or hostname) and port number, or just a port number, or
98           Unix socket path. If you specify port number but not the address,
99           searchd will listen on all network interfaces. Unix path is
100           identified by a leading slash. As the last param you can also
101           specify a protocol handler (listener) to be used for connections on
102           this socket. Supported protocol values are 'sphinx' (Sphinx 0.9.x
103           API protocol) and 'mysql41' (MySQL protocol used since 4.1 upto at
104           least 5.1).
105
106       --logdebug, --logdebugv, --logdebugvv
107           Enable additional debug output in the daemon log. Should only be
108           needed rarely, to assist with debugging issues that could not be
109           easily reproduced on request.  --logdebug causes daemon to fire
110           general debug messages.  --logdebugv and --logdebugvv points to
111           'verbose' and 'very verbose' debug info. The last could really
112           flood your logfile.
113
114       --nodetach
115           Do not 'daemonize', or, do not detach into background. Apart debug
116           purposes, this switch is useful when you manage sphinx with upstart
117           init daemon. In this case actual 'daemonizing' will be done by
118           upstart itself, and also all tasks like starting, stopping,
119           reloading the config and respawning on crash will be done by the
120           system, not the sphinx.
121
122       --pidfile PIDFILE
123           Explicitly state a PID file, where the process information is
124           stored regarding searchd, used for inter-process communications
125           (for example, indexer will need to know the PID to contact searchd
126           for rotating indexes). Normally, searchd would use a PID if running
127           in regular mode (i.e. not with --console), but it is possible that
128           you will be running it in console mode whilst the index is being
129           updated and rotated, for which a PID file will be needed.
130
131           Example:
132
133               $ searchd --config /home/myuser/sphinx.conf --pidfile /home/myuser/sphinx.pid
134
135       --replay-flags OPTIONS
136           Specify a list of extra binary log replay options. The supported
137           options are:
138
139           ·   accept-desc-timestamp, ignore descending transaction timestamps
140               and replay such transactions anyway (the default behavior is to
141               exit with an error).
142
143           Example:
144
145               $ searchd --replay-flags=accept-desc-timestamp
146
147       --port PORT, -p PORT
148           Specify the port that searchd should listen on, usually for
149           debugging purposes. This will usually default to 9312, but
150           sometimes you need to run it on a different port. Specifying it on
151           the command line will override anything specified in the
152           configuration file. The valid range is 0 to 65535, but ports
153           numbered 1024 and below usually require a privileged account in
154           order to run. Look also the --listen option, it will give you more
155           possibilities to tune here.
156
157           An example of usage:
158
159               $ searchd --port 9313
160
161       --safetrace
162           Forces searchd to only use system backtrace() call in crash
163           reports. In certain (rare) scenarios, this might be a "safer" way
164           to get that report. This is a debugging option.
165
166       --status
167           Query running searchd instance status, using the connection details
168           from the (optionally) provided configuration file. It will try to
169           connect to the running instance using the first configured UNIX
170           socket or TCP port. On success, it will query for a number of
171           status and performance counter values and print them. You can use
172           Status() API call to access the very same counters from your
173           application.
174
175           Examples:
176
177               $ searchd --status
178               $ searchd --config /home/myuser/sphinx.conf --status
179
180       --stop
181           Asynchronously stop searchd, using the details of the PID file as
182           specified in the sphinx.conf file, so you may also need to confirm
183           to searchd which configuration file to use with the --config
184           option. NB, calling --stop will also make sure any changes applied
185           to the indexes with UpdateAttributes() will be applied to the index
186           files themselves.
187
188           Example:
189
190               $ searchd --config /home/myuser/sphinx.conf --stop
191
192       --stopwait
193           Synchronously stop searchd.  --stop essentially tells the running
194           instance to exit (by sending it a SIGTERM) and then immediately
195           returns.  --stopwait will also attempt to wait until the running
196           searchd instance actually finishes the shutdown (eg. saves all the
197           pending attribute changes) and exits.
198
199           Example:
200
201               $ searchd --config /home/myuser/sphinx.conf --stopwait
202
203           Possible exit codes are as follows:
204
205           ·   0 on success;
206
207           ·   1 if connection to running searchd daemon failed;
208
209           ·   2 if daemon reported an error during shutdown;
210
211           ·   3 if daemon crashed during shutdown
212
213       --strip-path
214           Strip the path names from all the file names referenced from the
215           index (stopwords, wordforms, exceptions, etc). This is useful for
216           picking up indexes built on another machine with possibly different
217           path layouts.
218

SIGNALS

220       Last but not least, as every other daemon, searchd supports a number of
221       signals.
222
223       SIGTERM
224           Initiates a clean shutdown. New queries will not be handled; but
225           queries that are already started will not be forcibly interrupted.
226
227       SIGHUP
228           Initiates index rotation. Depending on the value of seamless_rotate
229           setting, new queries might be shortly stalled; clients will receive
230           temporary errors.
231
232       SIGUSR1
233           Forces reopen of searchd log and query log files, letting you
234           implement log file rotation.
235

AUTHOR

237       Andrey Aksenoff (shodan@sphinxsearch.com). This manual page is written
238       by Alexey Vinogradov (klirichek@sphinxsearch.com), using the one
239       written by Christian Hofstaedtler ch+debian-packages@zeha.at for the
240       Debian system (but may be used by others). Permission is granted to
241       copy, distribute and/or modify this document under the terms of the GNU
242       General Public License, Version 2 any later version published by the
243       Free Software Foundation.
244
245       On Debian systems, the complete text of the GNU General Public License
246       can be found in /usr/share/common-licenses/GPL.
247

SEE ALSO

249       indexer(1), search(1), indextool(1)
250
251       Sphinx and it's programs are documented fully by the Sphinx reference
252       manual available in /usr/share/doc/sphinxsearch.
253
254
255
2562.2.11-release                    07/19/2016                        SEARCHD(1)
Impressum