Control RPCs#
Debug#
The debug
RPC changes the debug category from the console.
Parameter #1—debug category
Name |
Type |
Presence |
Description |
---|---|---|---|
Debug category |
string |
Required |
The debug category to activate. Use a |
Debug logging categories#
Type |
Category |
---|---|
Special |
• |
Standard |
|
Dash |
|
Note: libevent
logging is configured on startup and cannot be modified by this RPC during runtime.
Example from Dash Core 20.0.1
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
Name |
Type |
Presence |
Description |
---|---|---|---|
mode |
string |
Optional |
Added in Dash Core 0.15.0 |
Result—information about memory usage
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing information about memory usage |
→ |
string : object |
Required |
An object containing information about locked memory manager |
→→ |
number (int) |
Required |
Number of bytes used |
→→ |
number (int) |
Required |
Number of bytes available in current arenas |
→→ |
number (int) |
Required |
Total number of bytes managed |
→→ |
number (int) |
Required |
Amount of bytes that succeeded locking |
→→ |
number (int) |
Required |
Number allocated chunks |
→→ |
number (int) |
Required |
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.
GetRPCInfo#
Added in Dash Core 18.0.0
The getrpcinfo
RPC returns details about the RPC server.
Parameters: none
Result—information about the RPC server
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
An object containing information about the RPC server |
→ |
array of objects |
Required |
An object containing information about active RPC commands |
→→ |
object |
Optional |
Information about a currently active command |
→→→ |
number (int) |
Required |
Name of the command |
→→→ |
number (int) |
Required |
Number of microseconds the command has been active |
Example from Dash Core 18.0.0
dash-cli getrpcinfo
Result:
{
"active_commands": [
{
"method": "generate",
"duration": 5226138
},
{
"method": "getrpcinfo",
"duration": 5
}
]
}
See also: none
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
Name |
Type |
Presence |
Description |
---|---|---|---|
RPC |
string |
Optional |
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
Name |
Type |
Presence |
Description |
---|---|---|---|
Sub-command |
string |
Optional |
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
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
The help text for the specified RPC or the list of commands. The |
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. When called without an argument, returns the list of categories with status that are currently being debug logged or not. When called with arguments, adds or removes categories from debug logging and return the lists above. The arguments are evaluated in order “include”, “exclude”. If an item is both included and excluded, it will thus end up being excluded.
Parameter #1—include categories
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array of strings |
Optional |
Enable debugging for these categories |
Parameter #2—exclude categories
Name |
Type |
Presence |
Description |
---|---|---|---|
|
array of strings |
Optional |
Enable debugging for these categories |
The categories are:
Type |
Category |
---|---|
Special |
• |
Standard |
|
Dash |
|
Result—a list of the logging categories that are active
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
A JSON object show a list of the logging categories that are active |
Example from Dash Core 21.1.0
Include a category in logging
dash-cli -testnet logging '["llmq", "chainlocks"]'
Result:
{
"addrman": false,
"bench": false,
"chainlocks": true,
"cmpctblock": false,
"coindb": false,
"coinjoin": false,
"creditpool": false,
"ehf": false,
"estimatefee": false,
"gobject": false,
"http": false,
"i2p": false,
"instantsend": false,
"leveldb": false,
"libevent": false,
"llmq": true,
"llmq-dkg": false,
"llmq-sigs": false,
"lock": false,
"mempool": false,
"mempoolrej": false,
"mnpayments": false,
"mnsync": false,
"net": false,
"netconn": false,
"proxy": false,
"prune": false,
"qt": false,
"rand": false,
"reindex": false,
"rpc": false,
"selectcoins": false,
"spork": false,
"tor": false,
"validation": false,
"walletdb": false,
"zmq": false
}
Excluding a previously included category (without including any new ones):
dash-cli -testnet logging '[]' '["chainlocks"]'
Result:
{
"addrman": false,
"bench": false,
"chainlocks": false,
"cmpctblock": false,
"coindb": false,
"coinjoin": false,
"creditpool": false,
"ehf": false,
"estimatefee": false,
"gobject": false,
"http": false,
"i2p": false,
"instantsend": false,
"leveldb": false,
"libevent": false,
"llmq": true,
"llmq-dkg": false,
"llmq-sigs": false,
"lock": false,
"mempool": false,
"mempoolrej": false,
"mnpayments": false,
"mnsync": false,
"net": false,
"netconn": false,
"proxy": false,
"prune": false,
"qt": false,
"rand": false,
"reindex": false,
"rpc": false,
"selectcoins": false,
"spork": false,
"tor": false,
"validation": false,
"walletdb": false,
"zmq": false
}
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
Name |
Type |
Presence |
Description |
---|---|---|---|
|
string |
Required |
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
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (int) |
Required |
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