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

Add format string argument to bpf-run #134

Merged
merged 1 commit into from
Aug 17, 2015
Merged

Add format string argument to bpf-run #134

merged 1 commit into from
Aug 17, 2015

Conversation

drzaeus77
Copy link
Collaborator

Added option:
-f format format string to apply to trace output (see python str.format())

Before:

sudo bpf-run -p sys_clone -c 'bpf_trace_printk("hello\n");' -t
            bash-3125  [000] d... 10961.350323: : hello
            bash-3125  [000] d... 10964.346823: : hello
   systemd-udevd-498   [003] d... 10965.883628: : hello

After:

bpf-run -p sys_clone -c 'bpf_trace_printk("hello\n");' -t -f '{5}'
hello
hello

Signed-off-by: Brenden Blanco [email protected]

Usage:
bpf-run -f "time={3} output={5}"

Signed-off-by: Brenden Blanco <[email protected]>
4ast pushed a commit that referenced this pull request Aug 17, 2015
Add format string argument to bpf-run
@4ast 4ast merged commit 5484bad into master Aug 17, 2015
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.

None yet

2 participants