]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Man/man1m/dtruss.1m
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Man / man1m / dtruss.1m
1 .TH dtruss 1m  "$Date:: 2007-08-05 #$" "USER COMMANDS"
2 .SH NAME
3 dtruss \- process syscall details. Uses DTrace.
4 .SH SYNOPSIS
5 .B dtruss
6 [\-acdeflhoLs] [\-t syscall] { \-p PID | \-n name | command }
7 .SH DESCRIPTION
8 dtruss prints details on process system calls. It is like a DTrace
9 version of truss, and has been designed to be less intrusive than
10 truss.
11
12 Of particular interest is the elapsed times and on cpu times, which
13 can identify both system 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 syscall 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 system 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 follow children as they are forked
42 .TP
43 \-l
44 force printing of pid/lwpid per line
45 .TP
46 \-L
47 don't print pid/lwpid per line
48 .TP
49 \-n name
50 examine processes with this name
51 .TP
52 \-o
53 print on-cpu times, us
54 .TP
55 \-s
56 print stack backtraces
57 .TP
58 \-p PID
59 examine this PID
60 .TP
61 \-t syscall
62 examine this syscall only
63 .PP
64 .SH EXAMPLES
65 .TP
66 run and examine the "df -h" command
67
68 .B dtruss 
69 df -h
70 .PP
71 .TP
72 examine PID 1871
73
74 .B dtruss
75 \-p 1871 
76 .PP
77 .TP
78 examine all processes called "tar"
79 #
80 .B dtruss
81 \-n tar
82 .PP
83 .TP
84 run test.sh and follow children
85 #
86 .B dtruss
87 \-f test.sh
88 .TP
89 run the "date" command and print elapsed and on cpu times,
90 #
91 .B dtruss
92 \-eo date
93 .PP
94 .SH FIELDS
95 .TP
96 PID/LWPID
97 Process ID / Lightweight Process ID
98 .TP
99 RELATIVE
100 relative timestamps to the start of the thread, us (microseconds)
101 .TP
102 ELAPSD
103 elapsed time for this system call, us
104 .TP
105 CPU
106 on-cpu time for this system call, us
107 .TP
108 SYSCALL(args)
109 system call name, with arguments (some may be evaluated)
110 .PP
111 .SH DOCUMENTATION
112 See the DTraceToolkit for further documentation under the 
113 Docs directory. The DTraceToolkit docs may include full worked
114 examples with verbose descriptions explaining the output.
115 .SH EXIT
116 dtruss will run forever until Ctrl\-C is hit, or if a command was
117 executed dtruss will finish when the command ends.
118 .SH AUTHOR
119 Brendan Gregg
120 [Sydney, Australia]
121 .SH SEE ALSO
122 procsystime(1M), dtrace(1M), truss(1)
123