GetStatus

Retrieve information and status about the system.

Parameters

  • [optional] all: Same as setting each parameter to True.

  • [optional] connection_count: The number of open connections.

  • [optional] cpu_utilization: Utilization of all CPUs. Return value is in [0,1] range.

  • [optional] memory_utilization: Physical memory used. Expressed as a fraction.

  • [optional] memory_utilization_gb: Physical memory used, in GB.

  • [optional] moving_average: This requests an additional output. For each of the look-back intervals given by “collect_interval_set” parameter, the values of all enabled parameters are returned.

  • [optional] queries_entered: The number of queries that the system started processing within the look-back interval.

  • [optional] queries_exited: The number of queries that the system finished processing within the look-back interval.

  • [optional] queries_running: The number of queries currently running.

  • [optional] queries_queued: The number of queued queries.

Details

When invoked without parameters, it returns general status information:

  • system: “ApertureDB”,

  • status: 0(ok), -1(not ready),

  • info: general information “OK”,

  • version: “0.6.0”,

For example,

# Query:
[{
    "GetStatus": {
    }
}]

# Response:
[{
    "GetStatus": {
        "info": "OK",
        "status": 0,
        "system": "ApertureDB",
        "version": "0.6.0",
    }
}]

Examples

The following shows how to obtain all status information:

# Query:
[{
    "GetStatus": {
        "all": True
    }
}]

# Response:
[{
    "GetStatus": {
        #
        # Begin instantaneous values
        #
        "connection_count": 1,
        "cpu_utilization": 0.69, # Obtained over a small interval, as instantaneous CPU usage is not available.
        "info": "OK",
        "memory_utilization": 0.09,
        "memory_utilization_gb": 3,
        "queries_running": 1,
        "status": 0,
        "system": "ApertureDB",
        "version": "0.6.0",
        "queries_queued": 0
        #
        # End instantaneous values
        #
        #
        # Begin values collected over time-intervals
        #
        "moving_average": [
            {
                "connection_count": 1, # Average
                "cpu_utilization": 0.658, # Average. Value 0.658 means more than half cores at 100% each or all cores at 66% each
                "interval_sec": 5, # Look-back (or averaging) interval
                "memory_utilization": 0.08, # Average
                "memory_utilization_gb": 2.7, # Average
                "queries_entered": 6, # Cumulative over the interval
                "queries_exited": 6, # Cumulative over the interval
                "queries_running": 1, # Average
                "queries_queued": 0 # Average
            },
            {
                "connection_count": 1,
                "cpu_utilization": 0.636,
                "interval_sec": 10, # Look-back (or averaging) interval
                "memory_utilization": 0.07,
                "memory_utilization_gb": 2.5,
                "queries_entered": 13,
                "queries_exited": 13,
                "queries_running": 1,
                "queries_queued": 0
            },
            {
                "connection_count": 0.8,
                "cpu_utilization": 0.475,
                "interval_sec": 30, # Look-back (or averaging) interval
                "memory_utilization": 0.04,
                "memory_utilization_gb": 1.3,
                "queries_entered": 31,
                "queries_exited": 30,
                "queries_running": 0.8,
                "queries_queued": 0
            }
        ],
        #
        # End values collected over time-intervals
        #
    }
}]

This is an example of how to limit status information to CPU utilization, including both current and historical values:

# Query
[{
    "GetStatus": {
        "cpu_utilization": True,
        "moving_average": True
    }
}]

# Response:
[{
    "GetStatus": {
        "cpu_utilization": 0.69,
        "info": "OK",
        "status": 0,
        "system": "ApertureDB",
        "version": "0.6.0"
        "moving_average": [
            {
                "cpu_utilization": 0.658,
                "interval_sec": 5
            },
            {
                "cpu_utilization": 0.636,
                "interval_sec": 10
            },
            {
                "cpu_utilization": 0.475,
                "interval_sec": 30
            }
        ],
    }
}]