2 Options for generic frontend server and yaz-ztest.
3 Included in both manual and man page for yaz-ztest
4 Note - these files have been altered for zebrasrv, and are not in
10 <varlistentry><term><literal>-a </literal>
11 <replaceable>file</replaceable></term>
13 Specify a file for dumping PDUs (for diagnostic purposes).
14 The special name <literal>-</literal> (dash) sends output to
15 <literal>stderr</literal>.
16 </para></listitem></varlistentry>
18 <varlistentry><term><literal>-S</literal></term>
20 Don't fork or make threads on connection requests. This is good for
21 debugging, but not recommended for real operation: Although the
22 server is asynchronous and non-blocking, it can be nice to keep
23 a software malfunction (okay then, a crash) from affecting all
24 current users. The server can only accept a single
25 connection in this mode.
26 </para></listitem></varlistentry>
27 <!-- The text for -S option is (in my opinion) the wrong way around. The main
28 argument for not using -S is that it can handle only one connection at a
29 time, whereas the forking and threading interfaces can handle multiple
30 connections. Also, the forking (but not threading) model can survive a
31 crash at a single server instance. Heikki -->
34 <varlistentry><term><literal>-1</literal></term>
36 Like <literal>-S</literal> but after one session the server
37 exits. This mode is for debugging <emphasis>only</emphasis>.
38 </para></listitem></varlistentry>
40 <varlistentry><term><literal>-T</literal></term>
42 Operate the server in threaded mode. The server creates a thread
43 for each connection rather than a fork a process. Only available
44 on UNIX systems that offers POSIX threads.
45 </para></listitem></varlistentry>
47 <varlistentry><term><literal>-s</literal></term>
49 Use the SR protocol (obsolete).
50 </para></listitem></varlistentry>
52 <varlistentry><term><literal>-z</literal></term>
54 Use the &acro.z3950; protocol (default). This option and <literal>-s</literal>
55 complement each other.
56 You can use both multiple times on the same command
57 line, between listener-specifications (see below). This way, you
58 can set up the server to listen for connections in both protocols
59 concurrently, on different local ports.
60 </para></listitem></varlistentry>
62 <varlistentry><term><literal>-l </literal>
63 <replaceable>file</replaceable></term>
65 Specify an output file for the diagnostic messages.
66 The default is to write this information to
67 <literal>stderr</literal>
68 </para></listitem></varlistentry>
70 <varlistentry><term><literal>-c </literal>
71 <replaceable>config-file</replaceable></term>
72 <listitem><para> Read configuration information from
73 <replaceable>config-file</replaceable>.
74 The default configuration is <literal>./zebra.cfg</literal>
75 </para></listitem></varlistentry>
77 <varlistentry><term><literal>-f </literal>
78 <replaceable>vconfig</replaceable></term>
79 <listitem><para>This specifies an &acro.xml; file that describes
80 one or more &yaz; frontend virtual servers. See section VIRTUAL
82 </para></listitem></varlistentry>
84 <varlistentry><term><literal>-C </literal>
85 <replaceable>fname</replaceable></term>
86 <listitem><para>Sets SSL certificate file name for server (PEM).
87 </para></listitem></varlistentry>
89 <varlistentry><term><literal>-v </literal>
90 <replaceable>level</replaceable></term>
92 The log level. Use a comma-separated list of members of the set
93 {fatal,debug,warn,log,malloc,all,none}.
94 </para></listitem></varlistentry>
95 <!-- The -v option (for log level) is not enough. There are many more
96 log switches than the simple levels you mention, and more can (and will)
97 be defined in (loadable?) modules. You can get them all listed in the
98 log file with '-v loglevel'. Most users will at least have interest in
99 'server', 'session', 'request', and 'requestdetail', and possibly
100 'searchhits', 'searchterms', 'resultsets', 'rpn'. And maybe many more...
101 I ought to write a script that greps the bits from the source code -
102 that is the only way to get to them, there is no longer any central
103 repository for them. No idea how to explain this neatly in the man
108 <varlistentry><term><literal>-u </literal>
109 <replaceable>uid</replaceable></term>
111 Set user ID. Sets the real UID of the server process to that of the
112 given user. It's useful if you aren't comfortable with having the
113 server run as root, but you need to start it as such to bind a
115 </para></listitem></varlistentry>
117 <varlistentry><term><literal>-w </literal>
118 <replaceable>working-directory</replaceable></term>
120 The server changes to this working directory during before listening
121 on incoming connections. This option is useful
122 when the server is operating from the <application>inetd</application>
123 daemon (see <literal>-i</literal>).
124 </para></listitem></varlistentry>
126 <varlistentry><term><literal>-p </literal>
127 <replaceable>pidfile</replaceable></term>
129 Specifies that the server should write its Process ID to
130 file given by <replaceable>pidfile</replaceable>.
131 A typical location would be <filename>/var/run/zebrasrv.pid</filename>.
132 </para></listitem></varlistentry>
134 <varlistentry><term><literal>-i</literal></term>
136 Use this to make the the server run from the
137 <application>inetd</application> server (UNIX only).
138 Make sure you use the logfile option <literal>-l</literal> in
139 conjunction with this mode and specify the <literal>-l</literal>
140 option before any other options.
141 </para></listitem></varlistentry>
143 -i: Better say "use this when the server is run from inetd", than "use
144 this to make the server run from inetd", as the option itself will only
145 tell zebra that it should assume that inetd started it.
149 <varlistentry><term><literal>-D</literal></term>
151 Use this to make the server put itself in the background and
152 run as a daemon. If neither <literal>-i</literal> nor
153 <literal>-D</literal> is given, the server starts in the foreground.
154 </para></listitem></varlistentry>
156 <varlistentry><term><literal>-install</literal></term>
158 Use this to install the server as an NT service
159 (Windows NT/2000/XP only).
160 Control the server by going to the Services in the Control Panel.
161 </para></listitem></varlistentry>
163 <varlistentry><term><literal>-installa</literal></term>
165 Use this to install and activate the server as an NT service
166 (Windows NT/2000/XP only).
167 Control the server by going to the Services in the Control Panel.
168 </para></listitem></varlistentry>
170 <varlistentry><term><literal>-remove</literal></term>
172 Use this to remove the server from the NT services
173 (Windows NT/2000/XP only).
174 </para></listitem></varlistentry>
176 <varlistentry><term><literal>-t </literal>
177 <replaceable>minutes</replaceable></term>
179 Idle session timeout, in minutes. Default is 60 minutes.
180 </para></listitem></varlistentry>
182 <varlistentry><term><literal>-k </literal>
183 <replaceable>size</replaceable></term>
185 Maximum record size/message size, in kilobytes. Default is 1024 KB (1 MB).
189 <varlistentry><term><literal>-d </literal>
190 <replaceable>daemon</replaceable></term>
192 Set name of daemon to be used in hosts access file.
195 <refentrytitle>hosts_access</refentrytitle>
196 <manvolnum>5</manvolnum>
200 <refentrytitle>tcpd</refentrytitle>
201 <manvolnum>8</manvolnum>
210 A <replaceable>listener-address</replaceable> consists of an optional
211 transport mode followed by a colon (:) followed by a listener address.
212 The transport mode is either a file system socket
213 <literal>unix</literal>,
214 a SSL TCP/IP socket <literal>ssl</literal>, or a plain TCP/IP socket
215 <literal>tcp</literal> (default).
219 For TCP, an address has the form
221 hostname | IP-number [: portnumber]
223 The port number defaults to 210 (standard &acro.z3950; port) for
224 privileged users (root), and 9999 for normal users.
225 The special hostname "@" is mapped to
226 the address INADDR_ANY, which causes the server to listen on any local
230 The default behavior for <literal>zebrasrv</literal> - if started
231 as non-priviledged user - is to establish
232 a single TCP/IP listener, for the &acro.z3950; protocol, on port 9999.
235 zebrasrv tcp:some.server.name.org:1234
241 To start the server listening on the registered port for
242 &acro.z3950;, or on a filesystem socket,
243 and to drop root privileges once the ports are bound, execute
244 the server like this from a root shell:
247 zebrasrv -u daemon tcp:@:210
248 zebrasrv -u daemon unix:/some/file/system/socket
250 Here <literal>daemon</literal> is an existing user account, and the
251 unix socket <literal>/some/file/system/socket</literal> is readable
252 and writable for the <literal>daemon</literal> account.
255 The line before the examples "zebrasrv -u daemon @" would sound better
256 if it said something like "execute the server from a root shell with a
257 command like one of these:" - so that our users won't cut and paste all
262 <!-- Keep this comment at the end of the file
267 sgml-minimize-attributes:nil
268 sgml-always-quote-attributes:t
271 sgml-parent-document: "zebrasrv.xml"
272 sgml-local-catalogs: nil
273 sgml-namecase-general:t