Runtime Debugging
NOTE All other debug namespace APIs EXCEPT FOR the following APIs are restricted with rpc.unsafe-debug.disable flag:
VM Tracing APIs, however with limited functionality (only pre-defined tracers are allowed)
debug_dumpBlock, debug_dumpStateTrie, debug_getBlockRlp, debug_getModifiedAccountsByHash, debug_getModifiedAccountsByNumber, debug_getBadBlocks, debug_getModifiedStorageNodesByNumber
debug_metrics
debug_freeOSMemory
Returns unused memory to the OS.
Console
debug.freeOSMemory()
RPC
{"method": "debug_freeOSMemory"}
Parameters
None
Return Value
None
Example
Console
> debug.freeOSMemory()
nullHTTP RPC
debug_gcStats
Returns GC statistics.
Console
debug.gcStats()
RPC
{"method": "debug_gcStats", "params": []}
Parameters
None
Return Value
See https://golang.org/pkg/runtime/debug/#GCStats for information about the fields of the returned object.
Example
Console
HTTP RPC
debug_memStats
Returns detailed runtime memory statistics.
Console
debug.memStats()
RPC
{"method": "debug_memStats", "params": []}
Parameters
None
Return Value
See https://golang.org/pkg/runtime/#MemStats for information about the fields of the returned object.
Example
Console
HTTP RPC
debug_metrics
Retrieves all the known system metrics collected by the node.
Console
debug.metrics(raw)
RPC
{"method": "debug_metrics", "params": [raw]}
Parameters
raw
bool
raw 데이터 자체로 출력하면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
Return Value
JSON string
노드가 수집한, 구조화된 측정 수치입니다.
Example
Console
HTTP RPC
debug_setGCPercent
Sets the garbage collection target percentage. It returns the previous setting. A negative value disables GC.
Parameters
Percent
integer
설정할 GC 비율입니다.
Return Value
integer
이전에 설정된 GC 비율입니다.
Example Console
HTTP RPC
debug_stacks
Returns a printed representation of the stacks of all goroutines.
Console
debug.stacks()
RPC
{"method": "debug_stacks", "params": []}
Parameters
None
Return Value
string
모든 go루틴의 스택 정보입니다.
Example
Console
HTTP RPC
Last updated
Was this helpful?