Control RPCs

Debug

The debug RPC changes the debug category from the console.

Parameter #1---debug category

NameTypePresenceDescription
Debug categorystringRequired
(1 or more)
The debug category to activate. Use a + to specify multiple categories. Categories will be one of the following:
0 - Disables all categories
1 or all - Enables all categories
addrman
bench
cmpctblock
coindb
db
estimatefee
http
leveldb
libevent
mempool
mempoolrej
net
proxy
prune
qt
rand
reindex
rpc
selectcoins
tor
zmq
dash (all subcategories)

The dash sub-categories can be enabled individually:
chainlocks
gobject
instantsend
keepass
llmq
llmq-dkg
llmq-sigs
mnpayments
mnsync
coinjoin
spork


Note: No error will be thrown even if the specified category doesn't match any of the above

Example from Dash Core 0.15.0

dash-cli -testnet debug "net+mempool"

Result:

Debug mode: net+mempool

See also

  • Logging: gets and sets the logging configuration

GetMemoryInfo

Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0

The getmemoryinfo RPC returns information about memory usage.

Parameter #1---mode

NameTypePresenceDescription
modestringOptional
Default: stats
Added in Dash Core 0.15.0

Determines what kind of information is returned.
- stats returns general statistics about memory usage in the daemon.
- mallocinfo returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+).

Result---information about memory usage

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
An object containing information about memory usage

locked
string : objectRequired
(exactly 1)
An object containing information about locked memory manager
→→
used
number (int)Required
(exactly 1)
Number of bytes used
→→
free
number (int)Required
(exactly 1)
Number of bytes available in current arenas
→→
total
number (int)Required
(exactly 1)
Total number of bytes managed
→→
locked
number (int)Required
(exactly 1)
Amount of bytes that succeeded locking
→→
chunks_used
number (int)Required
(exactly 1)
Number allocated chunks
→→
chunks_free
number (int)Required
(exactly 1)
Number unused chunks

Example from Dash Core 0.12.3

dash-cli getmemoryinfo

Result:

{
  "locked": {
    "used": 1146240,
    "free": 426624,
    "total": 1572864,
    "locked": 1572864,
    "chunks_used": 16368,
    "chunks_free": 7
  }
}

See also

  • GetMemPoolInfo: returns information about the node's current transaction memory pool.

Help

The help RPC lists all available public RPC commands, or gets help for the specified RPC. Commands which are unavailable will not be listed, such as wallet RPCs if wallet support is disabled.

Parameter #1---the name of the RPC to get help for

NameTypePresenceDescription
RPCstringOptional
(0 or 1)
The name of the RPC to get help for. If omitted, Dash Core 0.10x will display an alphabetical list of commands; Dash Core 0.11.0 will display a categorized list of commands

Parameter #2---the name of the subcommand to get help for

NameTypePresenceDescription
Sub-commandstringOptional
(0 or 1)
The subcommand to get help on. Please note that not all subcommands support this at the moment

Result---a list of RPCs or detailed help for a specific RPC

NameTypePresenceDescription
resultstringRequired
(exactly 1)
The help text for the specified RPC or the list of commands. The dash-cli command will parse this text and format it as human-readable text

Example from Dash Core 0.17.0

Command to get help about the help RPC:

dash-cli -testnet help help

Result:

help ( "command" "subcommand" )

List all commands, or get help for a specified command.

Arguments:
1. "command"     (string, optional) The command to get help on
2. "subcommand"  (string, optional) The subcommand to get help on. Please note that not all subcommands support this at the moment

Result:
"text"     (string) The help text

See also

Logging

The logging RPC gets and sets the logging configuration

Parameter #1---include categories

NameTypePresenceDescription
includearray of stringsOptional
(0 or 1)
Enable debugging for these categories

Parameter #2---exclude categories

NameTypePresenceDescription
excludearray of stringsOptional
(0 or 1)
Enable debugging for these categories

The categories are:

TypeCategory
Special0 - Disables all categories
1 or all - Enables all categories
dash - Enables/disables all Dash categories
Standardaddrman, bench
cmpctblock, coindb, db, estimatefee, http, leveldb, libevent, mempool, mempoolrej, net, proxy, prune, qt, rand, reindex, rpc, selectcoins, tor, zmq
Dash
chainlocks, gobject, instantsend, keepass, llmq, llmq-dkg, llmq-sigs, mnpayments, mnsync, coinjoin, spork

Result---a list of the logging categories that are active

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
A JSON object show a list of the logging categories that are active

Example from Dash Core 0.15.0

Include a category in logging

dash-cli -testnet logging '["llmq", "spork"]'

Result:

{
  "net": 0,
  "tor": 0,
  "mempool": 0,
  "http": 0,
  "bench": 0,
  "zmq": 0,
  "db": 0,
  "rpc": 0,
  "estimatefee": 0,
  "addrman": 0,
  "selectcoins": 0,
  "reindex": 0,
  "cmpctblock": 0,
  "rand": 0,
  "prune": 0,
  "proxy": 0,
  "mempoolrej": 0,
  "libevent": 0,
  "coindb": 0,
  "qt": 0,
  "leveldb": 0,
  "chainlocks": 0,
  "gobject": 0,
  "instantsend": 0,
  "keepass": 0,
  "llmq": 1,
  "llmq-dkg": 0,
  "llmq-sigs": 0,
  "mnpayments": 0,
  "mnsync": 0,
  "coinjoin": 0,
  "spork": 1
}

Excluding a previously included category (without including any new ones):

dash-cli -testnet logging '[]' '["spork"]'

Result:

{
  "net": 0,
  "tor": 0,
  "mempool": 0,
  "http": 0,
  "bench": 0,
  "zmq": 0,
  "db": 0,
  "rpc": 0,
  "estimatefee": 0,
  "addrman": 0,
  "selectcoins": 0,
  "reindex": 0,
  "cmpctblock": 0,
  "rand": 0,
  "prune": 0,
  "proxy": 0,
  "mempoolrej": 0,
  "libevent": 0,
  "coindb": 0,
  "qt": 0,
  "leveldb": 0,
  "chainlocks": 0,
  "gobject": 0,
  "instantsend": 0,
  "keepass": 0,
  "llmq": 1,
  "llmq-dkg": 0,
  "llmq-sigs": 0,
  "mnpayments": 0,
  "mnsync": 0,
  "coinjoin": 0,
  "spork": 0
}

See also

  • Debug: changes the debug category from the console.

Stop

The stop RPC safely shuts down the Dash Core server.

Parameters: none

Result---the server is safely shut down

NameTypePresenceDescription
resultstringRequired
(exactly 1)
The string \Dash Core server stopping""

Example from Dash Core 0.12.2

dash-cli -testnet stop

Result:

Dash Core server stopping

See also: none

Uptime

The uptime RPC returns the total uptime of the server.

Parameters: none

Result

NameTypePresenceDescription
resultnumber (int)Required
(exactly 1)
The number of seconds that the server has been running

Example from Dash Core 0.15.0

dash-cli -testnet uptime

Result:

5500

See also: none


What’s Next
Did this page help you?