Trace delivered signals
Show only signals like SIGTERM and SIGCHLD and skip syscalls, to find out who killed the process; for library calls use ltrace
strace -f -e signal=all -e trace=none -p <pid>
- tool
- strace13 commands
More strace commands
-
strace -o trace.log ls /tmpRun a command under strace and save the output to a file
-
strace -p $(pgrep nginx | head -1) -o /tmp/nginx.traceTrace the syscalls of a process that is already running, by PID
-
strace -e trace=openat,read,write curl https://example.comShow only openat, read and write calls and hide the rest
-
strace -c -e trace=all python3 app.pyPrint a summary table with the count and time of each syscall
-
strace -f -e trace=process nginx -tTrace process syscalls like fork and exec in all child processes (-f)