Skip to content

Add option to avoid killing the extractor - #187

Merged
0xB10C merged 1 commit into
peer-observer:masterfrom
edilmedeiros:opt-out-timer
Jul 18, 2025
Merged

0xB10C merged 1 commit into
peer-observer:masterfrom
edilmedeiros:opt-out-timer

Conversation

@edilmedeiros

@edilmedeiros edilmedeiros commented Jul 17, 2025 •

Copy link
Copy Markdown
Contributor

Adds a command line flag -no_idle_exit to avoid having the extractor process to finish in case it doesn't detect messages for a while. Keeps the default behavior, so this option is opt-in.

When developing and testing, it's useful to manually generate traffic and inspect the components of the monitoring pipeline. Since this is a slow process, the extractor keeps finishing.`

This makes development and testing easier. In https://github.com/ClubeBitcoinUnB/peer-observer-docker we are playing with generating manual traffic on regtest, but the extractor keeps killing itself.

Adds a command line flag `no_idle_exit` to avoid having the extractor process to
finish in case it doesn't detect messages for a while. Keeps the default
behavior, so this option is opt-in.

When developing and testing, it's useful to manually generate traffic and
inspect the components of the monitoring pipeline. Since this is a slow process,
the extractor keeps finishing.`
@edilmedeiros

Copy link
Copy Markdown
Contributor Author

Snippet of the working logs:

bitcoin-node-1  | 2025-07-17T21:52:52Z Adding fixed seeds as 60 seconds have passed and addrman is empty for at least one reachable network
bitcoin-node-1  | 2025-07-17T21:52:52Z Added 0 fixed seeds from reachable networks.
bitcoin-node-1  | 2025-07-17T21:52:53.328Z WARN  [ebpf_extractor] No events received in the last 60s. Is bitcoind or the network down?
bitcoin-node-1  | 2025-07-17T21:54:53.845Z ERROR [ebpf_extractor] No events received in the last 180s.
bitcoin-node-1  | 2025-07-17T21:54:53.845Z WARN  [ebpf_extractor] The bitcoind process might be down, has restarted and changed PIDs, or the network might be down.
bitcoin-node-1  | 2025-07-17T21:55:54.101Z WARN  [ebpf_extractor] No events received in the last 60s. Is bitcoind or the network down?
bitcoin-node-1  | 2025-07-17T21:57:54.665Z ERROR [ebpf_extractor] No events received in the last 180s.
bitcoin-node-1  | 2025-07-17T21:57:54.665Z WARN  [ebpf_extractor] The bitcoind process might be down, has restarted and changed PIDs, or the network might be down.

@0xB10C

0xB10C commented Jul 18, 2025

Copy link
Copy Markdown
Collaborator

Thanks, makes sense to have this for development and debugging!

ACK

Comment on lines +183 to +185
// The extractor tool will exit if it doesn't detect activity in the ebpf
// buffers for 180 seconds. This flag disables this and only emits warnings
// about inactivity. This can be useful during debugging.

@0xB10C 0xB10C Aug 11, 2025 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For clap to pick these up as argument docs shown with --help, these need to be three /.

fixing this in #216

Suggested change
// The extractor tool will exit if it doesn't detect activity in the ebpf
// buffers for 180 seconds. This flag disables this and only emits warnings
// about inactivity. This can be useful during debugging.
/// The extractor tool will exit if it doesn't detect activity in the ebpf
/// buffers for 180 seconds. This flag disables this and only emits warnings
/// about inactivity. This can be useful during debugging.

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.

2 participants