File: tarantoolctl.pod

package info (click to toggle)
tarantool 2.6.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 85,396 kB
  • sloc: ansic: 513,775; cpp: 69,493; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,176; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (193 lines) | stat: -rw-r--r-- 5,160 bytes parent folder | download | duplicates (4)
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
184
185
186
187
188
189
190
191
192
193
=head1 NAME

tarantoolctl - a utility to control Tarantool instances

=head1 SYNOPSIS

tarantoolctl COMMAND [INSTANCE] [FILE] [URI] [OPTIONS...]

=head1 DESCRIPTION

tarantoolctl may be used to introspect and control the state
of Tarantool instances.

The C<INSTANCE> represents the name of an instance file.

=head1 COMMANDS

The following commands are understood:

=over

=item start INSTANCE

Start the Tarantool instance specified on the command line if the
instance is not running. This does nothing if an instance is running.

=item stop INSTANCE

Stop the Tarantool instance specified on the command line if the instance
is running. This does nothing if an instance is not running.

=item status INSTANCE

Show status of the Tarantool instance specified on the command line
(started/stopped). If pid file exists and an alive control socket exists,
the return code is C<0>. Otherwise, the return code is not C<0>.
Reports typical problems to stderr (e.g. pid file exists and control
socket does not).

=item restart INSTANCE

Stop and start the Tarantool instance specified on the command line if
the instance is running. This does nothing if an instance is not running.

=item logrotate INSTANCE

Rotate logs of the Tarantool instance specified on the command line if
the instance is running. This works only if logging-into-file is enabled in
the instance file (C<box.cfg{log=...}> parameter). Pipe/syslog make no effect.

=item check INSTANCE

Check if there are syntax errors in the instance script of the Tarantool
instance specified on the command line.

=item enter INSTANCE

Enter the interactive console of the Tarantool instance specified on
the command line.

=item eval INSTANCE FILE

=item COMMAND | tarantoolctl eval INSTANCE

Evaluate a local file on the Tarantool instance specified on the command
line if the instance is running. This does nothing if an instance is not
running.

=item connect URI

=item COMMAND | tarantoolctl connect URI

Connect on an admin-console port to the Tarantool instance with the URI
specified on the command line. This supports both TCP/Unix sockets.

=item cat FILE... [--space=space_no...] [--show-system] [--from=from_lsn] [--to=to_lsn] [--replica=replica_id]

Print into stdout the contents of .snap/.xlog files specified on the
command line.

=item play URI FILE... [--space=space_no...] [--show-system] [--from=from_lsn] [--to=to_lsn] [--replica=replica_id]

Play the contents of .snap/.xlog files to another Tarantool instance with
URI specified on the command line.

=back

=head1 OPTIONS

The following options are understood:

=over

=item --space=space_no

Filter the output by space number. May be passed more than once.

=item --show-system

Show/play the contents of system spaces.

=item --from=from_lsn

Show/play operations starting from the given lsn.

=item --to=to_lsn

Show/play operations ending with the given lsn.

=item --replica=replica_id

Filter the output by replica ID. May be passed more than once.

=back

=head1 CONFIGURATION

The file with system-wide defaults for tarantoolctl is installed in
C</etc/default/tarantool>. This file is used when tarantoolctl is invoked
by root. When invoked by a local user, tarantoolctl first looks for its
defaults file in the current directory (C<$PWD/.tarantoolctl>), and then in
the current user's home directory (C<$HOME/.config/tarantool/tarantool>).
If not found, tarantoolctl falls back to built-in defaults:

    default_cfg = {
    pid_file  = "/var/run/tarantool",
    wal_dir   = "/var/lib/tarantool",
    memtx_dir = "/var/lib/tarantool",
    vinyl_dir = "/var/lib/tarantool",
    log       = "/var/log/tarantool",
    username  = "tarantool",
    }
    instance_dir = "/etc/tarantool/instances.enabled"

Most of these parameters are similar to those in C<box.cfg{}>:

=over

=item pid_file

Directory for the pid file and control-socket file; tarantoolctl will add
"/instance_name" to the directory name.

=item wal_dir

Directory for write-ahead *.xlog files; tarantoolctl will add
"/instance_name" to the directory name.

=item memtx_dir

Directory for snapshot *.snap files; tarantoolctl will add
"/instance_name" to the directory name.

=item vinyl_dir

Directory for vinyl files; tarantoolctl will add "/instance_name" to the
directory name.

=item log

The place where the application log will go; tarantoolctl will add
"/instance_name.log" to the name.

=item username

The user that runs the Tarantool instance. This is the operating-system
user name rather than the Tarantool-client user name. Tarantool will
change its effective user to this user after becoming a daemon.

=item instance_dir

The directory where all instance files for this host are stored. Put
instance files in this directory, or create symbolic links.

As a full-featured example, you can take C<example.lua> script that ships
with Tarantool and defines all configuration options.

=back

=head1 EXIT STATUS

On success, C<0> is returned, a non-zero failure code otherwise.

=head1 SEE ALSO

tarantool(1), Tarantool manual at http://tarantool.org/doc/

=head1 COPYRIGHT

Copyright (C) 2010-2017 Tarantool AUTHORS: please see AUTHORS file.

=cut