truss [options]arguments

Trace system calls, signals, and machine faults while executing arguments. arguments is either a Unix command to run or, if -p is specified, a list of process IDs representing the already running processes to trace. The options -m, -r, -s, -t, -v, -w, and -x accept a comma-separated list of arguments. A ! reverses the sense of the list, telling truss to ignore those elements of the list during the trace. (In the C shell, use a backslash before !.) The keyword all can include/exclude all possible elements for the list. The optional ! and corresponding description are shown in brackets. truss also provides tracing of user-level function calls in dynamically loaded shared libraries. See also sotruss and whocalls.

This command is particularly useful for finding missing files when a third-party application fails. By watching the access and open system calls, you can find where, and which, files the application program expected to find, but did not.

Many systems have similar programs named trace or strace. These programs are worth learning how to use.



Display parameters passed by each exec(2) call.


Count the traced items and print a summary rather than listing them as they happen.


Print a timestamp in the output, of the form seconds.fraction, indicating the time relative to the start of the trace. Times are when the system call completes, not starts.


Print a delta timestamp in the output, of the form seconds.fraction, indicating ...

Get Unix in a Nutshell, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.