Trace signals delivered strace
Show only signals (SIGTERM/SIGCHLD) and skip syscalls; debug mysterious kills. note: ltrace for libcalls
strace -f -e signal=all -e trace=none -p <pid>
more strace
all 13 commands →
Trace a new process
strace -o trace.log ls /tmp
Attach to running process
strace -p $(pgrep nginx | head -1) -o /tmp/nginx.trace
Trace only specific syscalls
strace -e trace=openat,read,write curl https://example.com
Count syscall statistics
strace -c -e trace=all python3 app.py
Follow child processes
strace -f -e trace=process nginx -t