Linux

strace

SafeTrace system calls

strace -p <pid>

Traces syscalls — the trump card for 'which file open failed' style mysteries.

Examples

  • strace -e trace=open,openat -f ./app 2>&1 | grep ENOENTFind missing files

Syntax

strace [-p pid] [-e trace=set] <cmd>

Before you run it

Slows the target; keep it brief in prod.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store