NAME
dapptrace - trace user and library function usage. Uses DTrace.
SYNOPSIS
ddaappppttrraaccee [-acdeFlhoU] [-u lib] { -p PID | command }
DESCRIPTION
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 the root user or users with the dtracekernel privilege can run this command. OOPPTTIIOONNSS-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 function call counts
-d print relative timestamps, us
-e print elapsed times, us
-F print flow indentation
-l force printing of pid/lwpid per line
-o print on-cpu times, us
-p PID examine this PID
-u lib trace this library instead
-U trace all library and user functions
EEXXAAMMPPLLEESSrun and examine the "df -h" command,
# ddaappppttrraaccee df -h
examine PID 1871,# ddaappppttrraaccee -p 1871
print using flow indents,# ddaappppttrraaccee -Fp 1871
print elapsed and CPU times,# ddaappppttrraaccee -eop 1871
FFIIEELLDDSS PID/LWPID Process ID / Lightweight Process ID RELATIVErelative timestamps to the start of the thread, us (microsec-
onds) ELAPSD elapsed time for this system call, usCPU on-cpu time for this system call, us
CALL(args) function call name, with some arguments in hexadecimal DDOOCCUUMMEENNTTAATTIIOONNSee the DTraceToolkit for further documentation under the Docs direc-
tory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output. EEXXIITTdapptrace will run forever until Ctrl-C is hit, or if a command was
executed dapptrace will finish when the command ends.
AUTHOR Brendan Gregg [Sydney, Australia]SEE ALSO
dappprof(1M), dtrace(1M), apptrace(1)version 1.10 May 14, 2005 dapptrace(1m)