Submodule box.info
The box.info
submodule provides access to information about server instance
variables.
- cluster.uuid is the UUID of the replica set.
Every instance in a replica set will have the same
cluster.uuid
value. This value is also stored in box.space._schema system space. - gc() returns the state of the Tarantool garbage collector including the checkpoints and their consumers (users); see details here.
- id corresponds to
replication[n].id
(see here). - lsn corresponds to
replication[n].lsn
(see here). - listen returns a real address to which an instance was bound (see here).
- memory() returns the statistics about memory (see here).
- pid is the process ID. This value is also shown by
tarantool module
and by the Linux command
ps -A
. - ro is
true
if the instance is in read-only mode (same as read_only inbox.cfg{}
), or if status is ‘orphan’. - ro_reason is
nil
if the instance is in writable mode. When the field is notnil
, it contains the reason why the instance is read-only. Possible error reasons:election
,synchro
,config
, andorphan
(see box.info.ro_reason for details). - signature is the sum of all
lsn
values from each vector clock (vclock) for all instances in the replica set. - sql().cache.size is the number of bytes in the SQL prepared statement cache.
- sql().cache.stmt_count is the number of statements in the SQL prepared statement cache.
- status is the current state of the instance. It can be:
running
– the instance is loaded,loading
– the instance is either recovering xlogs/snapshots or bootstrapping,orphan
– the instance has not (yet) succeeded in joining the required number of masters (see orphan status),hot_standby
– the instance is standing by another instance.
- uptime is the number of seconds since the instance started. This value can also be retrieved with tarantool.uptime().
- uuid corresponds to
replication[n].uuid
(see here). - vclock is a table with the vclock values of all instances in a replica set which have made data changes.
- version is the Tarantool version. This value is also shown by tarantool -V.
- vinyl() returns runtime statistics for the vinyl storage engine. This function is deprecated, use box.stat.vinyl() instead.
- election shows the current state of a replica set node regarding leader election (see here).
Below is a list of all box.info
functions and members.
Name | Use |
---|---|
box.info() | Return all keys and values provided in the submodule |
box.info.gc() | Return info about garbage collector |
box.info.memory() | Return info about memory usage |
box.info.replication_anon() | List all the anonymous replicas following the instance |
box.info.replication | Return statistics for all instances in the replica set |
box.info.listen | Return a real address to which an instance was bound |
box.info.election | Show the current state of a replica set node in regards to leader election |
box.info.synchro | Show the current state of synchronous replication |
box.info.ro_reason | Show the current mode of an instance (writable or read-only) |
box.info.schema_version | Show the database schema version |