Identify long-running Bitcoin RPC calls during a slowdown

When new requests become slow, a snapshot of the node's active commands can reveal which methods are still running and for how long.

Sort the in-flight commands

Bitcoin Core reports duration in microseconds. This jq expression converts it to seconds and puts the longest-running command first. Take a second sample while the incident is occurring.

bitcoin-cli getrpcinfo | jq '.active_commands | sort_by(.duration) | reverse | map({method, seconds: (.duration / 1000000)})'

Distinguish active work from request history

If a scan remains active across samples, inspect the initiating application and correlate its timestamps with disk and CPU activity. getrpcinfo itself can appear in the snapshot. Completed requests are absent, so short spikes may disappear before sampling. Use application timing logs to diagnose those cases.

bitcoincore.org getrpcinfo