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

Avoid cluttering console #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

simplyatul
Copy link

As mentioned in the issue #45, I updated the code.
Hope this helps.

Post this change, I see following output

sudo ./hello-tail.py
In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:5:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:41:9: warning: '__HAVE_BUILTIN_BSWAP32__' macro redefined [-Wmacro-redefined]
#define __HAVE_BUILTIN_BSWAP32__
        ^
<command line>:4:9: note: previous definition is here
#define __HAVE_BUILTIN_BSWAP32__ 1
        ^
In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:5:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:42:9: warning: '__HAVE_BUILTIN_BSWAP64__' macro redefined [-Wmacro-redefined]
#define __HAVE_BUILTIN_BSWAP64__
        ^
<command line>:5:9: note: previous definition is here
#define __HAVE_BUILTIN_BSWAP64__ 1
        ^
In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:5:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:43:9: warning: '__HAVE_BUILTIN_BSWAP16__' macro redefined [-Wmacro-redefined]
#define __HAVE_BUILTIN_BSWAP16__
        ^
<command line>:3:9: note: previous definition is here
#define __HAVE_BUILTIN_BSWAP16__ 1
        ^
3 warnings generated.
b'   hello-tail.py-2499    [000] .....  6464.246546: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.246701: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.246911: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247366: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247378: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247384: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247389: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247393: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247398: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247403: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247407: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247412: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247417: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.247421: bpf_trace_printk: Another syscall: 321'
b'CPU:0 [LOST 102 EVENTS]'
b'   hello-tail.py-2499    [000] .....  6464.248184: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.248189: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.248189: bpf_trace_printk: Another syscall: 321'
b'   hello-tail.py-2499    [000] .....  6464.248189: bpf_trace_printk: Another syscall: 321'

# Repeated prints of above calls come but it stops in a while.
# If I do sudo ls in another terminal, I see following

b'            bash-2501    [001] .....  6471.837279: bpf_trace_printk: Executing a program'
b'           <...>-2503    [000] .....  6471.847721: bpf_trace_printk: Executing a program'
b'           <...>-2505    [000] .....  6471.854628: bpf_trace_printk: Executing a program'
b'            bash-2507    [001] .....  6471.856390: bpf_trace_printk: Executing a program'
b'           <...>-2506    [000] .....  6471.858664: bpf_trace_printk: Executing a program' 

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

Successfully merging this pull request may close these issues.

1 participant