Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE book [
<!ENTITY % tnt SYSTEM "../tnt.ent">
%tnt;
]>
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="configuration-reference">
<title>Configuration reference</title>
<blockquote><para>
This chapter provides a reference of options which
can be set in the command line or
<filename>tarantool.cfg</filename> configuration file.
</para></blockquote>
<para>
Tarantool splits its configuration parameters between command
line options and a configuration file. Command line flags
are provided for the most basic properties only: the rest
must be set in the configuration file.
At runtime, this allows to disambiguate the source of
a configuration setting: it unequivocally comes either from
the command line, or from the options file, but never from
both.
</para>
<section>
<title>Command line options</title>
<para>
Tarantool follows the <citetitle
xlink:href="http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces">GNU
standard</citetitle> for its command line interface: long
options start with a double dash (<option>--option</option>),
their short counterparts use a single one (<option>-o</option>).
For phrases, both dashes and
underscores can be used as word separators
(<option>--cfg-get</option> and <option>--cfg_get</option> both work).
If an option requires an argument, you can either separate it
with a space or equals sign (<option>--cfg-get=pid_file</option> and
<option>--cfg-get pid_file</option> both work).
</para>
<itemizedlist>
<listitem xml:id="help-option">
<para><option>--help</option>, <option>-h</option></para>
<para>Print an annotated list of all available options and exit.</para>
</listitem>
<listitem xml:id="version-option">
<para><option>--version</option>, <option>-V</option></para>
<para>Print product name and version, for example:
<programlisting><prompt>$ </prompt> ./tarantool_box --version
Tarantool/Box 1.4.0-69-g45551dd
</programlisting>
In this example:
<simplelist>
<member>
<quote>Tarantool</quote> is the name
of the reusable asynchronous networking programming framework.
</member>
<member>
<quote>Box</quote> is the name
of the storage back-end.
</member>
<member>
The 3-number version follows the standard
<literal><major>-<minor>-<patch></literal>
scheme, in which <literal><major></literal> number
is changed only rarely, <literal><minor></literal>
is incremented for each new milestone and
indicates possible incompatible changes,
and <literal><patch></literal> stands for the number of
bug fix releases made after the start of the
milestone. The optional commit number and
commit SHA1 are output for non-released versions
only, and indicate how much this particular build has diverged
from the last release.
</member>
</simplelist>
</para>
<note><para>
Tarantool uses <link
xlink:href="http://www.kernel.org/pub/software/scm/git/docs/git-describe.html">git describe</link> to produce its version id, and
this id can be used at any time to check out the
corresponding source from our <link
xlink:href="git://github.com/mailru/tarantool.git">git repository</link>.
</para></note>
</listitem>
<listitem xml:id="config-option">
<para><option>--config=</option><userinput><filename>/path/to/config.file</filename></userinput>, <option>-c</option></para>
<para>
Tarantool does not start without a configuration file. By
default, the server looks for file named
<filename>tarantool.cfg</filename> in the current working
directory. An alternative location can be provided using
this option.
</para>
</listitem>
<listitem>
<para><option>--check-config</option></para>
<para>Check the configuration file for errors. This option is
normally used on the command line
before <quote>reload configuration</quote>
is issued on the administrative port, to ensure that the new
configuration is valid. When configuration is
indeed correct, the program produces no output and returns <literal>0</literal>.
Otherwise, information about discovered error is printed out
and the program terminates with a non-zero value.
</para>
</listitem>
<listitem>
<para><option>--cfg-get=</option><userinput>option_name</userinput></para>
<para>Given option name, print option value. If the
option does not exist, or the configuration file is
incorrect, an error is returned. If the option
is not explicitly specified, its default value is used
instead. Example:
<programlisting><prompt>$ </prompt>./tarantool_box --cfg-get=admin_port
33015 </programlisting>
</para>
</listitem>
<listitem>
<para><option>--init-storage</option></para>
<para>Initialize the directory, specified in <emphasis>vardir</emphasis>
configuration option by creating an empty snapshot file in
it. If <filename>vardir</filename> doesn't contain at
least one snapshot, the server does not start. There is no
<quote>magic</quote> with automatic initialization of
<filename>vardir</filename> on boot to make
potential system errors more noticeable. For example, if the
operating system reboots and fails to mount the partition on
which <filename>vardir</filename> is expected to reside, the
<filename>rc.d</filename> or <command>service</command> script
responsible for server restart will also fail, thanks to this
option.
</para>
</listitem>
<listitem>
<para><option>--cat</option> <userinput>snapshot.file</userinput></para>
<para>Print the snapshot file, pointed to by the argument,
in a human-readable form. For each log record, log sequence
number, time of entry, operation type and arguments are
printed out. Example:
<programlisting><prompt>$ </prompt>./tarantool_box --cat 00000000000000000002.xlog
lsn:2 tm:1301572243.430 t:65534 127.0.0.1:52728 INSERT n:0<"1:\x01\x00\x00\x00">
lsn:3 tm:1301572287.509 t:65534 127.0.0.1:52728 INSERT n:0<"1:\x01\x00\x00\x00", "hello">
lsn:4 tm:1301572313.691 t:65534 127.0.0.1:52728 UPDATE_FIELDS n:0flags:00000000 <"1:\x01\x00\x00\x00"> [field_no:1 op:set <"world">]</programlisting>
</para>
</listitem>
</itemizedlist>
<para>
The only two options which have effect on a running server are:
</para>
<itemizedlist>
<listitem>
<para><option>--verbose</option>, <option>-v</option></para>
<para>Increase verbosity level in log messages. This option
currently has no effect.</para>
</listitem>
<listitem>
<para><option>--background</option>, <option>-b</option></para>
<para>Detach from the controlling terminal and run in
background.
<caution><para>Tarantool uses
<filename>stdout</filename> and
<filename>stderr</filename> for
debug and error log output. When starting the server with
option <option>--background</option>, make sure to
either redirect its standard out and standard error
streams, or provide <emphasis>logger</emphasis> option
in the configuration file, since otherwise all logging
information will be lost</para></caution>
</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>The option file</title>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<para>
All advanced configuration parameters must be specified in an
option file, which is required for server start. If no path to
option file is specified on the command line (see
<option xlink:href="#config-option"
xlink:title="--config=...">--config</option>),
the server looks for a file named <filename>tarantool.cfg</filename>
in the current working directory.
</para>
<para>
To facilitate centralized and automated configuration
management, runtime configuration modifications are supported
solely through <emphasis role="tntadmin"
xlink:href="tarantool-user-guide#reload-configuration"
xlink:title="reload configuration"
xlink:role="http://docbook.org/xlink/role/olink">reload
configuration</emphasis> administrative statement. Thus, the
procedure to change Tarantool configuration at runtime is to
edit the configuration file. This ensures that, should the
server get killed or restart, no unexpected changes to
configuration can occur.
</para>
<para>
Not all configuration file settings are changeable at runtime:
such settings will be highlighted in this reference.
</para>
<para>
Tarantool maintains a set of all allowed configuration
parameters in two template files, which are easy to maintain
and extend:
<filename xlink:href="https://github.com/mailru/tarantool/blob/master/cfg/core_cfg.cfg_tmpl">cfg/core_cfg.cfg_tmpl</filename>,
<filename xlink:href="https://github.com/mailru/tarantool/blob/master/mod/box/box_cfg.cfg_tmpl">mod/box/box_cfg.cfg_tmpl</filename>.
These files can always be used as a reference for any
parameter in this manual.
</para>
<para>In addition, two working examples can be found in the source tree:
<filename xlink:href="https://github.com/mailru/tarantool/blob/master/test/box/tarantool.cfg">test/box/tarantool.cfg</filename>,
<filename xlink:href="https://github.com/mailru/tarantool/blob/master/test/box_big/tarantool.cfg">test/box_big/tarantool.cfg</filename>.
</para>
<section>
<title>Basic parameters</title>
<para>Parameter1</para>
</section>
</section>
</chapter>
<!--
vim: tw=66 syntax=docbk
vim: spell spelllang=en_us
-->