getmemoryinfo - Litecoin
Returns an object containing information about memory usage.
Parameters
Parameter
Type
Description
mode
string
Optional. Mode: stats, mallocinfo. Default=stats.
Request
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getmemoryinfo",
"params": ["stats"],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "getmemoryinfo",
"params": ["stats"],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"locked": {
"used": 65536,
"free": 196544,
"total": 262144,
"locked": 262144,
"chunks_used": 1,
"chunks_free": 1
}
}
}Response Parameters
Field
Type
Description
used
number
Number of bytes used.
free
number
Number of bytes available.
total
number
Total memory managed.
locked
number
Amount of locked memory.
Use Case
The getmemoryinfo method is essential for:
Memory diagnostics
Performance monitoring
Resource management
Debugging
Error Handling
Status Code
Error Message
Cause
403
Forbidden
Missing or invalid ACCESS-TOKEN.
Integration Notes
The getmemoryinfo method helps developers build robust applications that interact with the Litecoin blockchain.
Last updated
Was this helpful?