Skip to content

Add new net stats for streams and requests #2887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 31 additions & 8 deletions doc/reference/reference_lua/box_stat/net.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ box.stat.net()
.. function:: net()

Shows network activity: the number of bytes sent
and received, the number of connections, and the number of active requests
and received, the number of connections, streams, and requests
(current, average, and total).

:return: in the tables that ``box.stat.net()`` returns:
Expand All @@ -15,27 +15,50 @@ box.stat.net()
second in the last 5 seconds
* ``SENT.total`` and ``RECEIVED.total`` -- total number of bytes sent/received
since the server started
* ``CONNECTIONS.rps`` -- number of connections opened per second in the last 5 seconds
* ``CONNECTIONS.current`` -- number of open connections
* ``CONNECTIONS.rps`` -- average number of connections opened per second in the last 5 seconds
* ``CONNECTIONS.total`` -- total number of connections opened since the server started
* ``REQUESTS.current`` -- number of requests in progress, which can be
limited by :ref:`box.cfg.net_msg_max <cfg_networking-net_msg_max>`
* ``REQUESTS.rps`` -- number of requests processed per second in the last 5 seconds
* ``REQUESTS.total`` -- total number of requests processed since startup
* ``REQUESTS.rps`` -- average number of requests processed per second in the last 5 seconds
* ``REQUESTS.total`` -- total number of requests processed since the server started
* ``REQUESTS_IN_PROGRESS.current`` -- number of requests being currently processed by the :ref:`TX thread <memtx-memory>`
* ``REQUESTS_IN_PROGRESS.rps`` -- average number of requests processed by the TX thread per second in the last 5 seconds
* ``REQUESTS_IN_PROGRESS.total`` -- total number of requests processed by the TX thread since the server started
* ``STREAMS.current`` -- number of active :doc:`streams </book/box/stream>`
* ``STREAMS.rps`` -- average number of streams opened per second in the last 5 seconds
* ``STREAMS.total`` -- total number of streams opened since the server started
* ``REQUESTS_IN_STREAM_QUEUE.current`` -- number of requests waiting in stream queues
* ``REQUESTS_IN_STREAM_QUEUE.rps`` -- average number of requests in stream queues per second in the last 5 seconds
* ``REQUESTS_IN_STREAM_QUEUE.total`` -- total number of requests placed in stream queues since the server started


**Example:**

.. code-block:: tarantoolsession

tarantool> box.stat.net() -- 4 tables
tarantool> box.stat.net() -- 5 tables
---
- SENT:
- CONNECTIONS:
current: 0
rps: 0
total: 0
REQUESTS:
current: 0
rps: 0
total: 0
REQUESTS_IN_PROGRESS:
current: 0
rps: 0
total: 0
SENT:
total: 0
rps: 0
CONNECTIONS:
REQUESTS_IN_STREAM_QUEUE:
current: 0
rps: 0
total: 0
REQUESTS:
STREAMS:
current: 0
rps: 0
total: 0
Expand Down