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

Running chapter2/hello-tail.py clutters the console #45

Open
simplyatul opened this issue Nov 26, 2024 · 0 comments
Open

Running chapter2/hello-tail.py clutters the console #45

simplyatul opened this issue Nov 26, 2024 · 0 comments

Comments

@simplyatul
Copy link

On running hello-tail.py program, continuous prints on the console are observed. This makes it difficult to check expected log prints (like bpf_trace_printk("Executing a program");)

Here is the snap of the console

b'            sudo-2258    [001] .....  4624.922468: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922469: bpf_trace_printk: Another syscall: 14'
b'            sudo-2258    [001] .....  4624.922470: bpf_trace_printk: Another syscall: 14'
b'CPU:0 [LOST 113 EVENTS]'
b'   hello-tail.py-2260    [000] .....  4624.922512: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922521: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922525: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922526: bpf_trace_printk: Another syscall: 271'
b'   hello-tail.py-2260    [000] .....  4624.922534: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922538: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922540: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922541: bpf_trace_printk: Another syscall: 0'
b'   hello-tail.py-2260    [000] .....  4624.922547: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922551: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922560: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922563: bpf_trace_printk: Another syscall: 0'
b'            sudo-2258    [001] .....  4624.922565: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922567: bpf_trace_printk: Another syscall: 14'
b'            sudo-2258    [001] .....  4624.922568: bpf_trace_printk: Another syscall: 14'
b'            sudo-2258    [001] .....  4624.922569: bpf_trace_printk: Another syscall: 271'
b'            sudo-2258    [001] .....  4624.922572: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922573: bpf_trace_printk: Another syscall: 0'
b'            sudo-2258    [001] .....  4624.922575: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922576: bpf_trace_printk: Another syscall: 14'
b'            sudo-2258    [001] .....  4624.922577: bpf_trace_printk: Another syscall: 14'
b'            sudo-2258    [001] .....  4624.922578: bpf_trace_printk: Another syscall: 271'
b'    tmux: server-1470    [001] .....  4624.922604: bpf_trace_printk: Another syscall: 7'
b'    tmux: server-1470    [001] .....  4624.922607: bpf_trace_printk: Another syscall: 16'
b'    tmux: server-1470    [001] .....  4624.922608: bpf_trace_printk: Another syscall: 19'
b'            sudo-2258    [001] .....  4624.922625: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922626: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922637: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922638: bpf_trace_printk: Another syscall: 271'
b'   hello-tail.py-2260    [000] .....  4624.922639: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922649: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922652: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922656: bpf_trace_printk: Another syscall: 13'
b'   hello-tail.py-2260    [000] .....  4624.922662: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922665: bpf_trace_printk: Another syscall: 0'
b'   hello-tail.py-2260    [000] .....  4624.922665: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922667: bpf_trace_printk: Another syscall: 13'
b'            sudo-2258    [001] .....  4624.922668: bpf_trace_printk: Another syscall: 14'
b'   hello-tail.py-2260    [000] .....  4624.922675: bpf_trace_printk: Another syscall: 1'
b'   hello-tail.py-2260    [000] .....  4624.922679: bpf_trace_printk: Another syscall: 1'
b'            sudo-2258    [001] .....  4624.922680: bpf_trace_printk: Another syscall: 14'
b'            sudo-2258    [001] .....  4624.922681: bpf_trace_printk: Another syscall: 271'

I have made few simple changes to correct this behavior. I will attach the PR.

simplyatul added a commit to simplyatul/learning-ebpf that referenced this issue Nov 26, 2024
Fixes: lizrice#45

Signed-off-by: Atul Thosar <atulthosar@gmail.com>
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

No branches or pull requests

1 participant