7.3.45. status

7.3.45.1. 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.

7.3.45.2. Syntax

This command takes no parameters:

status

7.3.45.3. Usage

Here is a simple example:

Execution example:

status
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   {
#     "uptime": 0,
#     "max_command_version": 2,
#     "start_time": 1441980651,
#     "cache_hit_rate": 0.0,
#     "version": "5.0.7-126-gb6fd7f7",
#     "alloc_count": 206,
#     "command_version": 1,
#     "starttime": 1441980651,
#     "default_command_version": 1,
#     "n_queries": 0
#   }
# ]

It returns the current status of the context that processes the request. See Return value for details.

7.3.45.4. Parameters

This section describes all parameters.

7.3.45.4.1. Required parameters

There is no required parameters.

7.3.45.4.2. Optional parameters

There is no optional parameters.

7.3.45.5. 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 Output format for HEADER.

Here are descriptions about values. See Usage for real values:

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:

29.4
command_version The コマンドバージョン that is used by the context. 1
default_command_version The default コマンドバージョン of the Groonga process. 1
max_command_version The max コマンドバージョン 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:

29
start_time

New in version 5.0.8.

The time that the Groonga process started in UNIX time.

1441761403
starttime

Deprecated since version 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