Skip to content
Visit booth 3171 at Google Cloud Next to see how to unlock real-time decisions at scaleMore info

Generate usage statistics

Aerospike Graph Service (AGS) collects usage statistics automatically. Each time an AGS instance connects to the Aerospike database cluster, it records the start time, and it periodically records the current time. The virtual CPU (vCPU) and memory size are also recorded. These statistics provide an aggregate of the resource usage of all AGS vCPUs (across instances) connected to the Aerospike database cluster.

You can retrieve usage statistics with the following Gremlin console command:

g.call("aerospike.graph.admin.metadata.usage").next()

The command returns a Map<String, Object> with the following fields:

  • raw: the raw usage data.
  • total-vcpu-hours: the total vCPU-hours used by all AGS instances.

You can also retrieve usage statistics from a specific time period by specifying a date, in yyyy-mm-dd format.

The following example displays statistics gathered since March 30, 2023:

g.call("aerospike.graph.admin.metadata.usage").with("since", "2023-03-30").next()

Example output:

{ 'raw': [ { 'epoch-ms-final': 1702327851857,
'epoch-ms-start': 1702326901857,
'memory-gb': 32,
'uuid': '9c0ba414-c9f2-492f-adb9-9792bb6dfed1',
'vcpus': 16},
{ 'epoch-ms-final': 1702327148084,
'epoch-ms-start': 1702327148084,
'memory-gb': 9,
'uuid': 'c924f45e-886d-4c04-8039-292d56ea037c',
'vcpus': 16},
{ 'epoch-ms-final': 1702325278838,
'epoch-ms-start': 1702325278838,
'memory-gb': 9,
'uuid': '45daadf4-0cdb-49e8-b6aa-2aae7bf489b0',
'vcpus': 16},
{ 'epoch-ms-final': 1702323995477,
'epoch-ms-start': 1702323995477,
'memory-gb': 9,
'uuid': '3dfb41cf-0ce1-4326-a2f9-730f63a46db5',
'vcpus': 16}],
'total-vcpu-hours': 8.4819888381532217,
'estimated-annual-total-vcpus': 80000}

Output fields

In the raw object, each array element represents an AGS instance. Each instance contains the following statistics:

ValueDescription
epoch-ms-startTime since epoch in milliseconds when the AGS instance started.
epoch-ms-finalTime since epoch in milliseconds since the instance was last seen, updated every hour.
memory-gbTotal amount of system memory used by this instance.
uuidUnique identifier of this instance.
vcpusNumber of vCPUs used by this instance.
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?