shellspells beta

strace

strace [  -CdffhiqrtttTvxx ] [ -acolumn ] [ -eexpr ] ...  [ -ofile ] [
       -ppid ] ...  [ -sstrsize ] [ -uusername ] [ -Evar=val ] ...  [ -Evar  ]
       ...  [ command [ arg ...  ] ]

strace traces system calls from running processes.

The Linux version of truss. A useful debugging tool. Sometimes this is the only way to trace and debug what a task is doing in certain situations.

Examples

Trace a running task

$ sudo strace -p 2129

Run a program and trace it, writing trace information to a file

$ strace -o strace.out date

Related commands: trusssudo