Skip to content

Commit c6a4241

Browse files
committed
Fixes issues for net.box (gh-62, gh-33 and box.slab (gh-32, gh-84)
1 parent 03a1e86 commit c6a4241

File tree

11 files changed

+779
-287
lines changed

11 files changed

+779
-287
lines changed

sphinx/book/administration.rst

+12-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,18 @@ Administrative requests
540540
Server introspection
541541
=====================================================================
542542
543-
.. include:: box/box_introspection.rst
543+
For server introspection, use the reports provided by functions in the following
544+
submodules:
545+
546+
* :ref:`box.cfg <box_introspection-box_cfg>` submodule
547+
(check and specify all configuration parameters for the Tarantool server)
548+
* :ref:`box.slab <box_introspection-box_slab>` submodule
549+
(monitor the total use and fragmentation of memory allocated for storing
550+
data in Tarantool)
551+
* :ref:`box.info <box_introspection-box_info>` submodule
552+
(introspect Tarantool's server variables)
553+
* :ref:`box.stat <box_introspection-box_stat>` submodule
554+
(introspect Tarantool's request and network statistics)
544555
545556
================================================================================
546557
Replication

sphinx/book/box/box_cfg.rst

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. _box_introspection-box_cfg:
2+
3+
--------------------------------------------------------------------------------
4+
Submodule `box.cfg`
5+
--------------------------------------------------------------------------------
6+
7+
.. module:: box.cfg
8+
9+
The ``box.cfg`` submodule is for administrators to specify all the server
10+
configuration parameters (see "Configuration reference" for
11+
:ref:`a complete description of all configuration parameters <box_cfg_params>`).
12+
Use ``box.cfg`` without braces to get read-only access to those parameters.
13+
14+
**Example:**
15+
16+
.. code-block:: tarantoolsession
17+
18+
tarantool> box.cfg
19+
---
20+
- snapshot_count: 6
21+
too_long_threshold: 0.5
22+
slab_alloc_factor: 1.1
23+
slab_alloc_maximal: 1048576
24+
background: false
25+
<...>
26+
...

sphinx/book/box/box_info.rst

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
.. _box_introspection-box_info:
2+
3+
--------------------------------------------------------------------------------
4+
Submodule `box.info`
5+
--------------------------------------------------------------------------------
6+
7+
.. module:: box.info
8+
9+
The ``box.info`` submodule provides access to information about server variables.
10+
11+
* **server.lsn** Log Sequence Number for the latest entry in the WAL.
12+
* **server.ro** True if the server is in "read_only" mode
13+
(same as :ref:`read_only <cfg_basic-read_only>` in box.cfg).
14+
* **server.uuid** The unique identifier of this server,
15+
as stored in the database. This value is also
16+
in the :ref:`box.space._cluster <box_space-cluster>` system space.
17+
* **server.id** The number of this server within a cluster.
18+
* **version** Tarantool version. This value is also shown by
19+
:ref:`tarantool --version <index-tarantool_version>`.
20+
* **status** Usually this is 'running', but it can be 'loading', 'orphan', or 'hot_standby'.
21+
* **vclock** Same as replication.vclock.
22+
* **pid** Process ID. This value is also shown by the
23+
:ref:`tarantool <tarantool-build>` module.
24+
This value is also shown by the Linux "ps -A" command.
25+
* **cluster.uuid** UUID of the cluster. Every server in a cluster will have the same cluster.uuid value.
26+
This value is also in the :ref:`box.space._schema <box_space-schema>` system space.
27+
* **vinyl()** Returns runtime statistics for the vinyl storage engine.
28+
* **replication.lag** Number of seconds that the replica is behind the master.
29+
* **replication.status** Usually this is 'follow', but it can be
30+
'off', 'stopped', 'connecting', 'auth', or 'disconnected'.
31+
* **replication.idle** Number of seconds that the server has been idle.
32+
* **replication.vclock** See the :ref:`discussion of "vector clock" <internals-vector>` in the Internals section.
33+
* **replication.uuid** The unique identifier of a master to which this server is connected.
34+
* **replication.uptime** Number of seconds since the server started.
35+
This value can also be retrieved with :ref:`tarantool.uptime() <tarantool-build>`.
36+
37+
The replication fields are blank unless the server is a :ref:`replica <index-box_replication>`.
38+
The replication fields are in an array if the server is a replica for more than one master.
39+
40+
.. function:: box.info()
41+
42+
Since ``box.info`` contents are dynamic, it's not possible to iterate over
43+
keys with the Lua ``pairs()`` function. For this purpose, ``box.info()``
44+
builds and returns a Lua table with all keys and values provided in the
45+
submodule.
46+
47+
:return: keys and values in the submodule.
48+
:rtype: table
49+
50+
**Example:**
51+
52+
.. code-block:: tarantoolsession
53+
54+
tarantool> box.info()
55+
---
56+
- server:
57+
lsn: 158
58+
ro: false
59+
uuid: a2684219-b2b1-4334-88ab-50b0722283fd
60+
id: 1
61+
version: 1.7.2-435-g6ba8500
62+
pid: 12932
63+
status: running
64+
vclock:
65+
- 158
66+
replication:
67+
status: off
68+
uptime: 908
69+
...
70+
tarantool> box.info.pid
71+
---
72+
- 12932
73+
...
74+
tarantool> box.info.status
75+
---
76+
- running
77+
...
78+
tarantool> box.info.uptime
79+
---
80+
- 1065
81+
...
82+
tarantool> box.info.version
83+
---
84+
- 1.7.2-435-g6ba8500
85+
...
86+

sphinx/book/box/box_introspection.rst

-249
This file was deleted.

0 commit comments

Comments
 (0)