-
Notifications
You must be signed in to change notification settings - Fork 228
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
[Enhancement] Troubeshooting tools #524
Comments
Thanks for opening this issue! |
Should different command set be run based on different OS? Or just traverse the commands and collect the standard output into the pack? |
@linglilongyi Hi thanks for asking! I was wondering if calling syscall (wrapped by 3rd party library of course) rather than relying on external commands is a good idea. For example, if we want to collect routing information on the system, instead of
This is faster and lower-costly. |
I have some trouble. |
netfilter is notorious for the lack of programmable APIs:
https://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html#ss4.5 So feel free to exec command lines in this case. As of how to add new subcommand, would you mind drafting a PR in your fork so I can look into what's missing? |
I build up the |
Does the "drop-only" refer to conection with TcpFlag "S" ? |
@linglilongyi Currently |
I think that the "packets" refers to Could I insert // isDropOnly is true only when called with "--drop-only"
if isDropOnly && NearestSymbol(event.Pc).Name != "kfree_skb_reason" {
continue
} in https://github.com/daeuniverse/dae/blob/main/trace/trace.go#L276 to achieve that? Or I should drop the accepted package more upstreamly? |
@linglilongyi
We can collect events by skb address, hold the output until we see It also looks feasible (and fun) to deliver a bpf-only approach. We could use hash of array bpf map (BPF_MAP_TYPE_ARRAY_OF_MAPS?) to temporarily store events in kernel space and push events to userpace only if I can walk you though the details if you like. |
Should I replace unix mod with dae/tree/main/pkg/ebpf_internal/internal/unix/types_linux.go in #572 ? And for the drop-only feature, I finally find some func that generated by bpf2go in your repo. I still need some time to go through it. |
@jschwinger233 I have drafted a PR in my own fork, would you pleased have a check on it. It is all written in go now. |
@linglilongyi Thank you! jschwinger233 and I are busy these days. We'll contact you as soon as free. FYI. |
Improvement Suggestion
Two ideas:
dae sysdump
to automatically collect network settings (routing, netfilter, sysctl, ...) and archive all info into a tar. This can save us from asking "would you mind showing me your netfilter using xxx cmd".dae trace --drop-only
. This can make the tool much easier as users don't have specify ip or port.Potential Benefits
An ideal bug report would be providing with sysdump.tar + trace.log if possible.
The text was updated successfully, but these errors were encountered: