| 1 |
.. -*- rst -*- |
| 2 |
|
| 3 |
.. groonga-command |
| 4 |
.. database: commands_status |
| 5 |
|
| 6 |
``status`` |
| 7 |
========== |
| 8 |
|
| 9 |
Summary |
| 10 |
------- |
| 11 |
|
| 12 |
``status`` returns the current status of the context that processes |
| 13 |
the request. |
| 14 |
|
| 15 |
Context is an unit that processes requests. Normally, context is |
| 16 |
created for each thread. |
| 17 |
|
| 18 |
Syntax |
| 19 |
------ |
| 20 |
|
| 21 |
This command takes no parameters:: |
| 22 |
|
| 23 |
status |
| 24 |
|
| 25 |
.. _status-usage: |
| 26 |
|
| 27 |
Usage |
| 28 |
----- |
| 29 |
|
| 30 |
Here is a simple example: |
| 31 |
|
| 32 |
.. groonga-command |
| 33 |
.. include:: ../../example/reference/commands/status.log |
| 34 |
.. status |
| 35 |
|
| 36 |
It returns the current status of the context that processes the |
| 37 |
request. See :ref:`status-return-value` for details. |
| 38 |
|
| 39 |
Parameters |
| 40 |
---------- |
| 41 |
|
| 42 |
This section describes all parameters. |
| 43 |
|
| 44 |
Required parameters |
| 45 |
^^^^^^^^^^^^^^^^^^^ |
| 46 |
|
| 47 |
There is no required parameter. |
| 48 |
|
| 49 |
Optional parameters |
| 50 |
^^^^^^^^^^^^^^^^^^^ |
| 51 |
|
| 52 |
There is no optional parameter. |
| 53 |
|
| 54 |
.. _status-return-value: |
| 55 |
|
| 56 |
Return value |
| 57 |
------------ |
| 58 |
|
| 59 |
The command returns the current status as an object:: |
| 60 |
|
| 61 |
[ |
| 62 |
HEADER, |
| 63 |
{ |
| 64 |
"alloc_count": ALLOC_COUNT, |
| 65 |
"cache_hit_rate": CACHE_HIT_RATE, |
| 66 |
"command_version": COMMAND_VERSION, |
| 67 |
"default_command_version": DEFAULT_COMMAND_VERSION, |
| 68 |
"max_command_version": MAX_COMMAND_VERSION, |
| 69 |
"n_queries": N_QUERIES, |
| 70 |
"start_time": START_TIME, |
| 71 |
"starttime": STARTTIME, |
| 72 |
"uptime": UPTIME, |
| 73 |
"version": VERSION, |
| 74 |
"n_jobs": N_JOBS, |
| 75 |
"features": FEATURES, |
| 76 |
"apache_arrow": APACHE_ARROW_INFORMATION, |
| 77 |
"memory_map_size": MEMORY_MAP_SIZE, |
| 78 |
"n_workers": N_WORKERS, |
| 79 |
"default_n_workers": DEFAULT_N_WORKERS, |
| 80 |
"os": OS, |
| 81 |
"cpu": CPU_N_WORKERS |
| 82 |
} |
| 83 |
] |
| 84 |
|
| 85 |
See :doc:`/reference/command/output_format` for ``HEADER``. |
| 86 |
|
| 87 |
Here are descriptions about values. See :ref:`status-usage` for real |
| 88 |
values: |
| 89 |
|
| 90 |
.. list-table:: |
| 91 |
:header-rows: 1 |
| 92 |
|
| 93 |
* - Key |
| 94 |
- Description |
| 95 |
- Example |
| 96 |
* - ``alloc_count`` |
| 97 |
- The number of allocated memory blocks that aren't freed. If |
| 98 |
this value is continuously increased, there may be a memory |
| 99 |
leak. |
| 100 |
- ``1400`` |
| 101 |
* - ``cache_hit_rate`` |
| 102 |
- Percentage of cache used responses in the Groonga process. If |
| 103 |
there are 10 requests and 7 responses are created from cache, |
| 104 |
``cache_hit_rate`` is ``70.0``. The percentage is computed from |
| 105 |
only requests that use commands that support cache. |
| 106 |
|
| 107 |
Here are commands that support cache: |
| 108 |
|
| 109 |
* :doc:`select` |
| 110 |
* :doc:`logical_select` |
| 111 |
* :doc:`logical_range_filter` |
| 112 |
* :doc:`logical_count` |
| 113 |
|
| 114 |
- ``29.4`` |
| 115 |
* - ``command_version`` |
| 116 |
- The :doc:`/reference/command/command_version` that is used by |
| 117 |
the context. |
| 118 |
- ``1`` |
| 119 |
* - ``default_command_version`` |
| 120 |
- The default :doc:`/reference/command/command_version` of the |
| 121 |
Groonga process. |
| 122 |
- ``1`` |
| 123 |
* - ``max_command_version`` |
| 124 |
- The max :doc:`/reference/command/command_version` of the |
| 125 |
Groonga process. |
| 126 |
- ``2`` |
| 127 |
* - ``n_queries`` |
| 128 |
- The number of requests processed by the Groonga process. It |
| 129 |
counts only requests that use commands that support cache. |
| 130 |
|
| 131 |
Here are commands that support cache: |
| 132 |
|
| 133 |
* :doc:`select` |
| 134 |
* :doc:`logical_select` |
| 135 |
* :doc:`logical_range_filter` |
| 136 |
* :doc:`logical_count` |
| 137 |
|
| 138 |
- ``29`` |
| 139 |
* - ``start_time`` |
| 140 |
- .. versionadded:: 5.0.8 |
| 141 |
|
| 142 |
The time that the Groonga process started in UNIX time. |
| 143 |
- ``1441761403`` |
| 144 |
* - ``starttime`` |
| 145 |
- .. deprecated:: 5.0.8 |
| 146 |
Use ``start_time`` instead. |
| 147 |
- ``1441761403`` |
| 148 |
* - ``uptime`` |
| 149 |
- The elapsed time since the Groonga process started in second. |
| 150 |
|
| 151 |
For example, ``216639`` means that ``2.5`` (= ``216639 / 60 / |
| 152 |
60 / 24 = 2.507``) days. |
| 153 |
|
| 154 |
- ``216639`` |
| 155 |
* - ``version`` |
| 156 |
- The version of the Groonga process. |
| 157 |
- ``5.0.7`` |
| 158 |
|
| 159 |
* - ``n_jobs`` |
| 160 |
- The number of unprocessed jobs. |
| 161 |
- ``0`` |
| 162 |
|
| 163 |
* - ``features`` |
| 164 |
- .. versionadded:: 10.0.1 |
| 165 |
|
| 166 |
The list of Groonga's features and status (enabled or disabled). |
| 167 |
- .. code-block:: |
| 168 |
|
| 169 |
{ |
| 170 |
"nfkc": true, |
| 171 |
"mecab": true, |
| 172 |
"message_pack": true, |
| 173 |
"mruby": true, |
| 174 |
"onigmo": true, |
| 175 |
"zlib": true, |
| 176 |
"lz4": false, |
| 177 |
"zstandard": false, |
| 178 |
"kqueue": false, |
| 179 |
"epoll": true, |
| 180 |
"poll": false, |
| 181 |
"rapidjson": false, |
| 182 |
"apache_arrow": false, |
| 183 |
"xxhash": false, |
| 184 |
"blosc": true, |
| 185 |
"back_trace": true, |
| 186 |
"reference_count": false |
| 187 |
} |
| 188 |
|
| 189 |
* - ``apache_arrow`` |
| 190 |
- .. versionadded:: 10.0.1 |
| 191 |
|
| 192 |
The information about Apache Arrow that Groonga currently uses. It's only displayed when Apache Arrow is enabled. |
| 193 |
- .. code-block:: |
| 194 |
|
| 195 |
{ |
| 196 |
"version_major": 2, |
| 197 |
"version_minor": 0, |
| 198 |
"version_patch": 0, |
| 199 |
"version": "2.0.0" |
| 200 |
} |
| 201 |
|
| 202 |
* - ``memory_map_size`` |
| 203 |
- The total mapped memory size by this Groonga process in bytes. |
| 204 |
- ``2929`` |
| 205 |
|
| 206 |
* - ``n_workers`` |
| 207 |
- .. versionadded:: 13.1.2 |
| 208 |
|
| 209 |
The value of ``n_workers`` set in this context. |
| 210 |
- ``0`` |
| 211 |
|
| 212 |
* - ``default_n_workers`` |
| 213 |
- .. versionadded:: 13.1.2 |
| 214 |
|
| 215 |
The default ``n_workers`` value of the Groonga process. |
| 216 |
- ``0`` |
| 217 |
* - ``os`` |
| 218 |
- .. versionadded:: 14.0.8 |
| 219 |
|
| 220 |
The OS name. |
| 221 |
- ``Linux``, ``Darwin``, ``Windows`` and so on |
| 222 |
* - ``cpu`` |
| 223 |
- .. versionadded:: 14.0.8 |
| 224 |
|
| 225 |
The CPU architecture name. |
| 226 |
- ``x86_64``, ``arm64`` and so on |