Skip to content

new: add logs for traced ebpf progs#601

Merged
brb merged 1 commit intocilium:mainfrom
Andreagit97:add_prog_name_logs
Sep 30, 2025
Merged

new: add logs for traced ebpf progs#601
brb merged 1 commit intocilium:mainfrom
Andreagit97:add_prog_name_logs

Conversation

@Andreagit97
Copy link
Contributor

The idea behind this commit is to show the user which eBPF programs are found.
I found it useful while testing the tool. If you don't see an event associated with a specific bpf program, there is always the doubt that the program is not found at all. Now this log should clarify the situation.

Example output:

sudo ./pwru 'src host 10.10.0.11' --filter-trace-tc 
2025/09/24 17:40:14 Attaching tc-bpf progs...
2025/09/24 17:40:14 Found bpf prog: SchedCLS(tcx_test)#17 
2025/09/24 17:40:15 Listening for events..

Note

The output string is in the following format: progType(progName)#fd

Example output:

sudo ./pwru 'src host 10.10.0.11' --filter-trace-xdp
2025/09/24 17:50:04 Attaching xdp progs...
2025/09/24 17:50:04 No bpf progs found with type 'XDP'
2025/09/24 17:50:04 Attaching kprobes (via kprobe-multi)...

Show to the user which ebpf progs are found. Show a different message if
no programs for that type are found.

Signed-off-by: Andrea Terzolo <[email protected]>
@Andreagit97 Andreagit97 requested a review from a team as a code owner September 24, 2025 15:50
@Andreagit97 Andreagit97 requested review from rgo3 and removed request for a team September 24, 2025 15:50
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

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

Thanks!

@brb brb merged commit ccc1221 into cilium:main Sep 30, 2025
26 of 29 checks passed
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