TARANTOOLCTL(1)
π TARANTOOLCTL β a utility to control Tarantool instances π
okay bestie, this is tarantoolctl(1) from the Tarantool instances control fam, and honestly? she's the group chat moderator for all your Tarantool instances. let's get into it π
β¨ SYNOPSIS β¨
tarantoolctl COMMAND [INSTANCE] [FILE] [URI] [OPTIONS...]
like, you give her a command, maybe an instance, maybe a file, maybe a URI, maybe some options, and she handles it. π
π¦ DESCRIPTION π¦
so tarantoolctl is the girl who can introspect and control the state of your Tarantool instances. she sees all, she knows all, she starts and stops things. main character energy fr fr.
and when we say INSTANCE? that's just the name of an instance file. that's it. that's the whole thing. no cap. π
π COMMANDS π
these are the commands she understands, bestie. memorize them, they're iconic:
start INSTANCEβ starts the Tarantool instance you named on the command line, but only if it's not already running. if it's running? she does nothing. she's not gonna double-start, that's not the vibe. π«Άstop INSTANCEβ stops the Tarantool instance you named, but only if it's actually running. if it's not running, she does nothing. respectful queen.status INSTANCEβ shows you the status of the instance (started/stopped, obvi). here's the tea: if the pid file exists and an alive control socket exists, the return code is0. otherwise the return code is not0. she also reports typical problems tostderr(like, say, pid file exists but control socket does not π). she will tell you what's wrong.restart INSTANCEβ stop and start the instance you named, but only if it's running. if it's not running? nothing happens. she's not gonna invent an instance for you.logrotate INSTANCEβ rotates logs of the instance you named, if the instance is running. BUT β this only works if logging-into-file is enabled in the instance file (that's thebox.cfg{log=...}parameter). pipe/syslog make no effect. so if you're piping logs somewhere, this command is giving nothing, sorry babe πcheck INSTANCEβ checks if there are syntax errors in the instance script of the instance you named. like a lil spell-check but for lua. β¨enter INSTANCEβ drops you into the interactive console of the instance you named. go talk to her directly. π¬eval INSTANCE FILEβ or, if you're feeling pipe-y:COMMAND | tarantoolctl eval INSTANCE. evaluates a local file on the instance you named, if the instance is running. if it's not running, nothing happens. π€·ββοΈconnect URIβ orCOMMAND | tarantoolctl connect URI. connects on an admin-console port to the Tarantool instance at the URI you gave. supports both TCP and Unix sockets. versatile queen. π₯cat FILE... [--space=space_no...] [--show-system] [--from=from_lsn] [--to=to_lsn] [--replica=replica_id]β prints the contents of the.snap/.xlogfiles you specified into stdout. yes she will just dump them at you. πplay URI FILE... [--space=space_no...] [--show-system] [--from=from_lsn] [--to=to_lsn] [--replica=replica_id]β plays the contents of those.snap/.xlogfiles to another Tarantool instance, the one at the URI you gave. replaying history, literally. βͺ
π OPTIONS π
the options she understands. one bullet per option because we're organized:
--space=space_noβ filters the output by space number. you can pass this more than once if you're fancy. π--show-systemβ shows/plays the contents of system spaces. peek behind the curtain bestie. π--from=from_lsnβ shows/plays operations starting from the given lsn.--to=to_lsnβ shows/plays operations ending with the given lsn.--replica=replica_idβ filters the output by replica ID. and yes, you can pass this more than once too. go off. π
πΈ CONFIGURATION πΈ
okay this part is important, listen up. the file with system-wide defaults for tarantoolctl is installed in /etc/default/tarantool. this file is used when tarantoolctl is invoked by root.
when it's invoked by a local user, tarantoolctl first looks for its defaults file in the current directory ($PWD/.tarantoolctl), and then in the current user's home directory ($HOME/.config/tarantool/tarantool).
if not found? she falls back to built-in defaults. no drama:
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 box.cfg{}. here's the rundown:
pid_fileβ directory for the pid file and control-socket file.tarantoolctlwill add/instance_nameto the directory name.wal_dirβ directory for write-ahead*.xlogfiles.tarantoolctlwill add/instance_nameto the directory name.memtx_dirβ directory for snapshot*.snapfiles.tarantoolctlwill add/instance_nameto the directory name.vinyl_dirβ directory for vinyl files.tarantoolctlwill add/instance_nameto the directory name.logβ the place where the application log will go.tarantoolctlwill add/instance_name.logto the name.usernameβ the user that runs the Tarantool instance. heads up: this is the operating-system user name, not the Tarantool-client user name. Tarantool will change its effective user to this user after becoming a daemon. so like, it's the OS-level identity, iykyk. πinstance_dirβ the directory where all instance files for this host are stored. put instance files in this directory, or create symbolic links. your call bestie. π¦
as a full-featured example, you can take the example.lua script that ships with Tarantool and defines all configuration options. she's the blueprint. β¨
π EXIT STATUS π
on success, 0 is returned. a non-zero failure code otherwise. simple as that. no in-between. periodt.
π₯ SEE ALSO π₯
tarantool(1)- Tarantool manual at http://tarantool.org/doc/
go read those too, bestie, they're literally so good. π
π COPYRIGHT π
Copyright (C) 2010-2017 Tarantool AUTHORS: please see AUTHORS file.
and that's the whole page!! this was --name=tarantoolctl, dated 2025-01-05, from the TARANTOOLCTL(1) era β mwah, iconic, ate, no crumbs left. go start some instances and slay πβ¨π¦
π¦ where this page comes from
- ubuntu questing: tarantool-common 2.6.0-1.4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms