dapptrace(1m) USER COMMANDS dapptrace(1m)

dapptrace - trace user and library function usage. Uses DTrace.

dapptrace [-acdeFlhoU] [-u lib] { -p PID | command }

dapptrace prints details on user and library function calls. By default it traces user functions only, options can be used to trace library activity.

Of particular interest is the elapsed times and on cpu times, which can identify both function 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 function call counts
print relative timestamps, us
print elapsed times, us
print flow indentation
force printing of pid/lwpid per line
print on-cpu times, us
examine this PID
trace this library instead
trace all library and user functions

# dapptrace df -h
# dapptrace -p 1871
# dapptrace -Fp 1871
# dapptrace -eop 1871

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
function call name, with some arguments in hexadecimal

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

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

Brendan Gregg [Sydney, Australia]

dappprof(1M), dtrace(1M), apptrace(1)

May 14, 2005 version 1.10