strace

strace#

Trace system calls.

$ strace ./prog
$ strace -f -p PID
$ strace -e openat ./prog
$ strace -c ./prog