Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/misc.cpp
Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Lines | static UniValue getmemoryinfo(const Config &config, | ||||
* as users will undoubtedly confuse it with the other "memory pool" | * as users will undoubtedly confuse it with the other "memory pool" | ||||
*/ | */ | ||||
if (request.fHelp || request.params.size() > 1) { | if (request.fHelp || request.params.size() > 1) { | ||||
throw std::runtime_error(RPCHelpMan{ | throw std::runtime_error(RPCHelpMan{ | ||||
"getmemoryinfo", | "getmemoryinfo", | ||||
"Returns an object containing information about memory usage.\n", | "Returns an object containing information about memory usage.\n", | ||||
{ | { | ||||
{"mode", RPCArg::Type::STR, /* opt */ true, | {"mode", RPCArg::Type::STR, /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "\"stats\"", | ||||
"determines what kind of information is returned. This " | "determines what kind of information is returned.\n" | ||||
"argument is optional, the default mode is \"stats\".\n" | "This argument is optional, the default mode is \"stats\".\n" | ||||
Fabien: This line should be removed | |||||
deadalnixAuthorUnsubmitted Done Inline ActionsYeah, it's redundant indeed. deadalnix: Yeah, it's redundant indeed. | |||||
" - \"stats\" returns general statistics about memory usage " | " - \"stats\" returns general statistics about memory usage " | ||||
"in the daemon.\n" | "in the daemon.\n" | ||||
" - \"mallocinfo\" returns an XML string describing " | " - \"mallocinfo\" returns an XML string describing " | ||||
"low-level heap state (only available if compiled with glibc " | "low-level heap state (only available if compiled with glibc " | ||||
"2.10+)."}, | "2.10+)."}, | ||||
}, | }, | ||||
{ | { | ||||
RPCResult{"mode \"stats\"", | RPCResult{"mode \"stats\"", | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 2) { | ||||
"with special meanings:\n" | "with special meanings:\n" | ||||
" - \"all\", \"1\" : represent all logging categories.\n" | " - \"all\", \"1\" : represent all logging categories.\n" | ||||
" - \"none\", \"0\" : even if other logging categories are " | " - \"none\", \"0\" : even if other logging categories are " | ||||
"specified, ignore all of them.\n", | "specified, ignore all of them.\n", | ||||
{ | { | ||||
{"include", | {"include", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
/* opt */ true, | /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "null", | ||||
"A json array of categories to add debug logging", | "A json array of categories to add debug logging", | ||||
{ | { | ||||
{"include_category", RPCArg::Type::STR, | {"include_category", RPCArg::Type::STR, | ||||
/* opt */ false, /* default_val */ "", | /* opt */ false, /* default_val */ "", | ||||
"the valid logging category"}, | "the valid logging category"}, | ||||
}}, | }}, | ||||
{"exclude", | {"exclude", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
/* opt */ true, | /* opt */ true, | ||||
/* default_val */ "", | /* default_val */ "null", | ||||
"A json array of categories to remove debug logging", | "A json array of categories to remove debug logging", | ||||
{ | { | ||||
{"exclude_category", RPCArg::Type::STR, | {"exclude_category", RPCArg::Type::STR, | ||||
/* opt */ false, /* default_val */ "", | /* opt */ false, /* default_val */ "", | ||||
"the valid logging category"}, | "the valid logging category"}, | ||||
}}, | }}, | ||||
}, | }, | ||||
RPCResult{"{ (json object where keys are the " | RPCResult{"{ (json object where keys are the " | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |
This line should be removed