Novice seeking help: error in bpftrace command for detecting the readline function in /bin/bash via kprobe #2575
Answered
by
viktormalik
try-agaaain
asked this question in
Q&A
-
I am new to bpftrace and I wanted to detect the readline function in $ sudo bpftrace -e 'kprobe:/bin/bash:readline { printf("%s readline called in /bin/bash\n", comm); }' But when I execute it, the following error appears in the terminal: stdin:1:1-26: ERROR: kprobe probe type requires 1 argument
kprobe:/bin/bash:readline { printf("%s readline called in /bin/bash\n", comm); } Can anyone help me to see what the problem is? Any suggestions would be appreciated! |
Beta Was this translation helpful? Give feedback.
Answered by
viktormalik
Apr 22, 2023
Replies: 1 comment 1 reply
-
Hi, for tracing userspace functions, you need to use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
try-agaaain
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, for tracing userspace functions, you need to use
uprobe
, i.e.uprobe:/bin/bash:readline
.