Last updated

get_counts

[Source]

The get_counts command provides various stats about the health of the server, mostly the number of objects of different types that it currently holds in memory.

The get_counts method is an admin method that cannot be run by unprivileged users.

Request Format

An example of the request format:

  1. WebSocket
  2. JSON-RPC
  3. Commandline
{
    "id": 90,
    "command": "get_counts",
    "min_count": 100
}

The request includes the following parameters:

FieldTypeDescription
min_countNumber (Unsigned Integer)Only return fields with a value at least this high.

Response Format

An example of a successful response:

  1. JSON-RPC
  2. Commandline
{
   "result" : {
      "AL_hit_rate" : 48.36725616455078,
      "HashRouterEntry" : 3048,
      "Ledger" : 46,
      "NodeObject" : 10417,
      "SLE_hit_rate" : 64.62035369873047,
      "STArray" : 1299,
      "STLedgerEntry" : 646,
      "STObject" : 6987,
      "STTx" : 4104,
      "STValidation" : 610,
      "Transaction" : 4069,
      "dbKBLedger" : 10733,
      "dbKBTotal" : 39069,
      "dbKBTransaction" : 26982,
      "fullbelow_size" : 0,
      "historical_perminute" : 0,
      "ledger_hit_rate" : 71.0565185546875,
      "node_hit_rate" : 3.808214902877808,
      "node_read_bytes" : 393611911,
      "node_reads_hit" : 1283098,
      "node_reads_total" : 679410,
      "node_writes" : 1744285,
      "node_written_bytes" : 794368909,
      "status" : "success",
      "treenode_cache_size" : 6650,
      "treenode_track_size" : 598631,
      "uptime" : "3 hours, 50 minutes, 27 seconds",
      "write_load" : 0
   }
}

The response follows the standard format. The list of fields contained in the result is subject to change without notice, but it may contain any of the following (among others):

FieldTypeDescription
TransactionNumberThe number of Transaction objects in memory
LedgerNumberThe number of ledgers in memory
uptimeStringThe amount of time this server has been running uninterrupted.

For most other entries, the value indicates the number of objects of that type currently in memory.

Possible Errors

  • Any of the universal error types.
  • invalidParams - One or more fields are specified incorrectly, or one or more required fields are missing.