Trace signals delivered

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>

tool
strace13 commands
tags
stracedebugtroubleshootingkernel

More strace commands

  • strace -o trace.log ls /tmp

    Run a command under strace and save output to file

  • strace -p $(pgrep nginx | head -1) -o /tmp/nginx.trace

    Trace syscalls of an already-running process by PID

  • strace -e trace=openat,read,write curl https://example.com

    Filter to file-related syscalls only

  • strace -c -e trace=all python3 app.py

    Summary table of syscall counts and time spent

  • strace -f -e trace=process nginx -t

    Trace syscalls in all forked children (-f)

all 13 strace commands