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

bpflist: Display processes with running BPF programs and maps #1043

Merged
merged 1 commit into from
Mar 10, 2017

Conversation

goldshtn
Copy link
Collaborator

This tool displays processes with running BPF programs and maps,
and also optionally kprobes and uprobes. This is a poor-man's version
that snoops BPF file descriptors, as proposed by @brendangregg.

Example:

PID    COMM             TYPE     COUNT
4058   fileslower       prog     4
4058   fileslower       map      2
4106   bashreadline     map      1
4106   bashreadline     prog     1

Resolves #1036.

This tool displays processes with running BPF programs and maps,
and also optionally kprobes and uprobes. This is a poor-man's version
that snoops BPF file descriptors, as proposed by @brendangregg.

Example:

```
PID    COMM             TYPE     COUNT
4058   fileslower       prog     4
4058   fileslower       map      2
4106   bashreadline     map      1
4106   bashreadline     prog     1
```

Resolves iovisor#1036.
@goldshtn
Copy link
Collaborator Author

BTW I haven't added the code for listing pinned BPF maps because I don't have an easy sample that uses pinned BPF maps. Do you have something @brendangregg?

@brendangregg
Copy link
Member

Thanks! Looks like a good start.

In the future we might want to do a /proc//fd/ walker directly in python, since the "ls -l" may hit a "arglist too long" shell limit.

Can also add a -V at some point for really verbose, where it finishes by printing /sys/kernel/debug/tracing/kprobe_events and uprobe_events. It would be nice to associate that output with the PIDs, but that may need to wait for kernel support.

@goldshtn
Copy link
Collaborator Author

@brendangregg Try -vv :-)

@brendangregg
Copy link
Member

Oh, great, thanks, it's already there!

@brendangregg brendangregg merged commit 3da7b4a into iovisor:master Mar 10, 2017
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