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.

64 lines
1.8 KiB

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