File: status.rst

package info (click to toggle)
groonga 9.0.0-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 101,496 kB
  • sloc: ansic: 608,707; ruby: 35,042; xml: 23,643; cpp: 10,319; sh: 7,453; yacc: 5,968; python: 3,033; makefile: 2,609; perl: 133
file content (151 lines) | stat: -rw-r--r-- 3,521 bytes parent folder | download | duplicates (5)
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
.. -*- rst -*-

.. highlightlang:: none

.. groonga-command
.. database: commands_status

``status``
==========

Summary
-------

``status`` returns the current status of the context that processes
the request.

Context is an unit that processes requests. Normally, context is
created for each thread.

Syntax
------

This command takes no parameters::

  status

.. _status-usage:

Usage
-----

Here is a simple example:

.. groonga-command
.. include:: ../../example/reference/commands/status.log
.. status

It returns the current status of the context that processes the
request. See :ref:`status-return-value` for details.

Parameters
----------

This section describes all parameters.

Required parameters
^^^^^^^^^^^^^^^^^^^

There is no required parameter.

Optional parameters
^^^^^^^^^^^^^^^^^^^

There is no optional parameter.

.. _status-return-value:

Return value
------------

The command returns the current status as an object::

  [
    HEADER,
    {
      "alloc_count": ALLOC_COUNT,
      "cache_hit_rate": CACHE_HIT_RATE,
      "command_version": COMMAND_VERSION,
      "default_command_version": DEFAULT_COMMAND_VERSION,
      "max_command_version": MAX_COMMAND_VERSION,
      "n_queries": N_QUERIES,
      "start_time": START_TIME,
      "starttime": STARTTIME,
      "uptime": UPTIME,
      "version": VERSION
    }
  ]

See :doc:`/reference/command/output_format` for ``HEADER``.

Here are descriptions about values. See :ref:`status-usage` for real
values:

.. list-table::
   :header-rows: 1

   * - Key
     - Description
     - Example
   * - ``alloc_count``
     - The number of allocated memory blocks that aren't freed.  If
       this value is continuously increased, there may be a memory
       leak.
     - ``1400``
   * - ``cache_hit_rate``
     - Percentage of cache used responses in the Groonga process. If
       there are 10 requests and 7 responses are created from cache,
       ``cache_hit_rate`` is ``70.0``. The percentage is computed from
       only requests that use commands that support cache.

       Here are commands that support cache:

         * :doc:`select`
         * :doc:`logical_select`
         * :doc:`logical_range_filter`
         * :doc:`logical_count`

     - ``29.4``
   * - ``command_version``
     - The :doc:`/reference/command/command_version` that is used by
       the context.
     - ``1``
   * - ``default_command_version``
     - The default :doc:`/reference/command/command_version` of the
       Groonga process.
     - ``1``
   * - ``max_command_version``
     - The max :doc:`/reference/command/command_version` of the
       Groonga process.
     - ``2``
   * - ``n_queries``
     - The number of requests processed by the Groonga process. It
       counts only requests that use commands that support cache.

       Here are commands that support cache:

         * :doc:`select`
         * :doc:`logical_select`
         * :doc:`logical_range_filter`
         * :doc:`logical_count`

     - ``29``
   * - ``start_time``
     - .. versionadded:: 5.0.8

       The time that the Groonga process started in UNIX time.
     - ``1441761403``
   * - ``starttime``
     - .. deprecated:: 5.0.8
          Use ``start_time`` instead.
     - ``1441761403``
   * - ``uptime``
     - The elapsed time since the Groonga process started in second.

       For example, ``216639`` means that ``2.5`` (= ``216639 / 60 /
       60 / 24 = 2.507``) days.

     - ``216639``
   * - ``version``
     - The version of the Groonga process.
     - ``5.0.7``