HomePhabricator

rpc: Add `getmemoryinfo` call

Description

rpc: Add getmemoryinfo call

getmemoryinfo
Returns an object containing information about memory usage.

Result:
{
  "locked": {               (json object) Information about locked memory manager
    "used": xxxxx,          (numeric) Number of bytes used
    "free": xxxxx,          (numeric) Number of bytes available in current arenas
    "total": xxxxxxx,       (numeric) Total number of bytes managed
    "locked": xxxxxx,       (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
  }
}

Examples:
> bitcoin-cli getmemoryinfo
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Sep 18 2016, 08:22
deadalnixPushed on May 14 2017, 22:04
Parents
rABC4536148b1559: support: Add LockedPool
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABC65679990967c: rpc: Add `getmemoryinfo` call (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Oct 27 2016, 11:17