bpftrace -e 'tracepoint:syscalls:sys_enter_open* { printf("%d\n", pid); }'
bpftrace -e 'tracepoint:syscalls:sys_enter_open* { printf("%d %s\n", pid, str(args->filename)); }'
You can do it like this:
bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%d %s\n", pid, str(args->filename)); } tracepoint:syscalls:sys_enter_openat { printf("%d %s\n", pid, str(args->filename)); }'
You can do it like this:
This is a bit awkward, but it seems that this will be fixed: https://github.com/iovisor/bpftrace/issues/132