strace - trace system calls and signals
strace [-p PID] [-f] [-e trace=SET] [command]
Options you will use
-p PID- Attach to a running process. Needs root here.
-f- Follow forks.
-e trace=SET- Only these syscalls, e.g. -e trace=openat,read.
-c- Summarise counts and time per syscall.
Gotchas
- A process stuck in read() with nothing coming back is waiting on the other side - a network peer that will never answer, usually because no timeout was configured.
Try strace in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.