]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Man/man1m/dapptrace.1m
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Man / man1m / dapptrace.1m
1 .TH dapptrace 1m  "$Date:: 2007-08-05 #$" "USER COMMANDS"
2 .SH NAME
3 dapptrace \- trace user and library function usage. Uses DTrace.
4 .SH SYNOPSIS
5 .B dapptrace
6 [\-acdeFlhoU] [\-u lib] { \-p PID | command }
7 .SH DESCRIPTION
8 dapptrace prints details on user and library function calls. By
9 default it traces user functions only, options can be used to
10 trace library activity.
11
12 Of particular interest is the elapsed times and on cpu times, which
13 can identify both function calls that are slow to complete, and those
14 which are consuming CPU cycles.
15
16 Since this uses DTrace, only the root user or users with the
17 dtrace_kernel privilege can run this command.
18 .SH OS
19 Solaris
20 .SH STABILITY
21 stable - needs the pid provider.
22 .SH OPTIONS
23 .TP
24 \-a
25 print all details
26 .TP
27 \-b bufsize
28 dynamic variable buffer size. Increase this if you notice dynamic
29 variable drop errors. The default is "4m" for 4 megabytes per CPU.
30 .TP
31 \-c
32 print function call counts
33 .TP
34 \-d
35 print relative timestamps, us
36 .TP
37 \-e
38 print elapsed times, us
39 .TP
40 \-F
41 print flow indentation
42 .TP
43 \-l
44 force printing of pid/lwpid per line
45 .TP
46 \-o
47 print on-cpu times, us
48 .TP
49 \-p PID
50 examine this PID
51 .TP
52 \-u lib
53 trace this library instead
54 .TP
55 \-U
56 trace all library and user functions
57 .PP
58 .SH EXAMPLES
59 .TP
60 run and examine the "df -h" command,
61
62 .B dapptrace 
63 df -h
64 .PP
65 .TP
66 examine PID 1871,
67
68 .B dapptrace
69 \-p 1871 
70 .PP
71 .TP
72 print using flow indents,
73 #
74 .B dapptrace
75 \-Fp 1871
76 .PP
77 .TP
78 print elapsed and CPU times,
79 #
80 .B dapptrace
81 \-eop 1871
82 .PP
83 .SH FIELDS
84 .TP
85 PID/LWPID
86 Process ID / Lightweight Process ID
87 .TP
88 RELATIVE
89 relative timestamps to the start of the thread, us (microseconds)
90 .TP
91 ELAPSD
92 elapsed time for this system call, us
93 .TP
94 CPU
95 on-cpu time for this system call, us
96 .TP
97 CALL(args)
98 function call name, with some arguments in hexadecimal
99 .PP
100 .SH DOCUMENTATION
101 See the DTraceToolkit for further documentation under the 
102 Docs directory. The DTraceToolkit docs may include full worked
103 examples with verbose descriptions explaining the output.
104 .SH EXIT
105 dapptrace will run forever until Ctrl\-C is hit, or if a command was
106 executed dapptrace will finish when the command ends.
107 .SH AUTHOR
108 Brendan Gregg
109 [Sydney, Australia]
110 .SH SEE ALSO
111 dappprof(1M), dtrace(1M), apptrace(1)
112