Mac Developer Library Developer


This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.

dtruss(1m)                                      USER COMMANDS                                     dtruss(1m)

       dtruss - process syscall details. Uses DTrace.

       dtruss [-acdeflhoLs] [-t syscall] { -p PID | -n name | command }

       dtruss  prints  details  on  process system calls. It is like a DTrace version of truss, and has been
       designed to be less intrusive than truss.

       Of particular interest is the elapsed times and on cpu times, which can identify  both  system  calls
       that are slow to complete, and those which are consuming CPU cycles.

       Since this uses DTrace, only users with root privileges can run this command.

       -a     print all details

       -b bufsize
              dynamic  variable  buffer  size. Increase this if you notice dynamic variable drop errors. The
              default is "4m" for 4 megabytes per CPU.

       -c     print system call counts

       -d     print relative timestamps, us

       -e     print elapsed times, us

       -f     follow children as they are forked

       -l     force printing of pid/lwpid per line

       -L     don't print pid/lwpid per line

       -n name
              examine processes with this name

       -o     print on-cpu times, us

       -s     print stack backtraces

       -p PID examine this PID

       -t syscall
              examine this syscall only

       run and examine the "df -h" command
              # dtruss df -h

       examine PID 1871
              # dtruss -p 1871

       examine all processes called "tar"
              # dtruss -n tar

       run and follow children
              # dtruss -f

       run the "date" command and print elapsed and on cpu times,
              # dtruss -eo date

              Process ID / Lightweight Process ID

              relative timestamps to the start of the thread, us (microseconds)

       ELAPSD elapsed time for this system call, us

       CPU    on-cpu time for this system call, us

              system call name, with arguments (some may be evaluated)

       See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs  may
       include full worked examples with verbose descriptions explaining the output.

       dtruss will run forever until Ctrl-C is hit, or if a command was executed dtruss will finish when the
       command ends.

       Brendan Gregg [Sydney, Australia]

       procsystime(1M), dtrace(1M), truss(1)

version 0.80                                    Jun 17, 2005                                      dtruss(1m)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.