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

libbpf-tools: add exitsnoop #3564

Merged
merged 1 commit into from
Aug 8, 2021
Merged

Conversation

chenhengqi
Copy link
Collaborator

$ sudo ./exitsnoop
PCOMM            PID     PPID    TID     AGE(s)  EXIT_CODE
awk              2128720 2128718 2128720 0.01    0
sh               2128718 289432  2128718 0.01    0
zsh              2128721 2126939 2128721 0.00    0
a.out            2128722 2126939 2128722 0.28    signal 11 (Segmentation fault), core dumped
zsh              2128726 2126939 2128726 0.00    0
zsh              2128729 2128728 2128729 0.00    0
wc               2128730 2128728 2128730 0.00    0
zsh              2128728 2128727 2128728 0.01    0
git              2128731 2128727 2128731 0.00    code 1
git              2128732 2128727 2128732 0.00    code 128

Signed-off-by: Hengqi Chen [email protected]

Signed-off-by: Hengqi Chen <[email protected]>
Copy link
Contributor

@anakryiko anakryiko left a comment

Choose a reason for hiding this comment

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

Some of the options from exitsnoop.py are missing. They don't seem to be too hard to implement. Any reason you omitted them? Please try to keep this tool as close to the original Python version so that it can be a complete drop-in replacement.

@chenhengqi
Copy link
Collaborator Author

Yes, it's trivial to implement them, but they are left out intentionally.

  • The label option adds nothing valuable to tracing output and seems redundant. None of the existing tools has this option. Omit utc option for the same reason.
  • The timespec option is intended for RHEL 7.6 (with kernel 3.10), which has no support for BTF, I think it's not possible to get it run on a RHEL 7.6 instance. While on Centos 8 (RHEL 8), this tool works properly.

Copy link
Contributor

@anakryiko anakryiko left a comment

Choose a reason for hiding this comment

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

Makes sense (though I can see how UTC might be useful, but it's fine). LGTM.

@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song yonghong-song merged commit 101304b into iovisor:master Aug 8, 2021
brho pushed a commit to brho/bcc that referenced this pull request Nov 3, 2021
add exitsnoop libbpf tool.

Signed-off-by: Hengqi Chen <[email protected]>
CrackerCat pushed a commit to CrackerCat/bcc that referenced this pull request Jul 31, 2024
add exitsnoop libbpf tool.

Signed-off-by: Hengqi Chen <[email protected]>
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.

3 participants