You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.8 KiB

  1. # Debugging
  2. ## tendermint debug kill
  3. Tendermint comes with a `debug` sub-command that allows you to kill a live
  4. Tendermint process while collecting useful information in a compressed archive.
  5. The information includes the configuration used, consensus state, network
  6. state, the node' status, the WAL, and even the stack trace of the process
  7. before exit. These files can be useful to examine when debugging a faulty
  8. Tendermint process.
  9. ```bash
  10. tendermint debug kill <pid> </path/to/out.zip> --home=</path/to/app.d>
  11. ```
  12. will write debug info into a compressed archive. The archive will contain the
  13. following:
  14. ```
  15. ├── config.toml
  16. ├── consensus_state.json
  17. ├── net_info.json
  18. ├── stacktrace.out
  19. ├── status.json
  20. └── wal
  21. ```
  22. Under the hood, `debug kill` fetches info from `/status`, `/net_info`, and
  23. `/dump_consensus_state` HTTP endpoints, and kills the process with `-6`, which
  24. catches the go-routine dump.
  25. ## tendermint debug dump
  26. Also, the `debug dump` sub-command allows you to dump debugging data into
  27. compressed archives at a regular interval. These archives contain the goroutine
  28. and heap profiles in addition to the consensus state, network info, node
  29. status, and even the WAL.
  30. ```bash
  31. tendermint debug dump </path/to/out> --home=</path/to/app.d>
  32. ```
  33. will perform similarly to `kill` except it only polls the node and
  34. dumps debugging data every frequency seconds to a compressed archive under a
  35. given destination directory. Each archive will contain:
  36. ```
  37. ├── consensus_state.json
  38. ├── goroutine.out
  39. ├── heap.out
  40. ├── net_info.json
  41. ├── status.json
  42. └── wal
  43. ```
  44. Note: goroutine.out and heap.out will only be written if a profile address is
  45. provided and is operational. This command is blocking and will log any error.