Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug Command #4227

Merged
merged 28 commits into from
Dec 13, 2019
Merged

Debug Command #4227

merged 28 commits into from
Dec 13, 2019

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Dec 9, 2019

Implement a new subcommand: tendermint debug. This subcommand itself has two subcommands:


  1. $ tendermint debug kill <pid> </path/to/out.zip> --home=</path/to/app.d>

Writes debug info into a compressed archive. The archive will contain the following:

├── config.toml
├── consensus_state.json
├── net_info.json
├── stacktrace.out
├── status.json
└── wal

The Tendermint process will be killed.


  1. $ tendermint debug dump </path/to/out> --home=</path/to/app.d>

This command will perform similar to kill except it only polls the node and dumps debugging data every frequency seconds to a compressed archive under a given destination directory. Each archive will contain:

├── consensus_state.json
├── goroutine.out
├── heap.out
├── net_info.json
├── status.json
└── wal

Note:

  • goroutine.out and heap.out will only be written if a profile address is provided and is operational.
  • This command is blocking and will log any error.

replaces: #3327
closes: #3249


  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

@alexanderbez alexanderbez changed the title Bez/3249 tm debug tool Debug Command Dec 9, 2019
@alexanderbez alexanderbez marked this pull request as ready for review December 10, 2019 18:51
Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melekes
Copy link
Contributor

melekes commented Dec 11, 2019

Superb work @alexanderbez! We will need to update https://docs.tendermint.com/master/tendermint-core/running-in-production.html ("Debugging Tendermint" section) and maybe even write a blog post 🏣

@alexanderbez
Copy link
Contributor Author

@melekes I've added a small section to the running-in-production.md doc and I've also addressed the comments 👍

@melekes melekes merged commit 4bfec79 into master Dec 13, 2019
@melekes melekes deleted the bez/3249-tm-debug-tool branch December 13, 2019 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tendermint-debug tool
3 participants