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.

print all details
dynamic variable buffer size. Increase this if you notice dynamic variable drop errors. The default is "4m" for 4 megabytes per CPU.
print system call counts
print relative timestamps, us
print elapsed times, us
follow children as they are forked
force printing of pid/lwpid per line
don't print pid/lwpid per line
examine processes with this name
wait for a process matching this name
print on-cpu times, us
print stack backtraces
examine this PID
examine this syscall only

# dtruss df -h
# dtruss -p 1871
# dtruss -n tar
# dtruss -f test.sh
# dtruss -eo date

Process ID / Lightweight Process ID
relative timestamps to the start of the thread, us (microseconds)
elapsed time for this system call, us
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)

June 17, 2005 version 0.80