6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / dtrace.1m
blobfc71612e0f1ab2a2fc110de93ddf12e6aa274739
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH DTRACE 1M "Aug 4, 2009"
7 .SH NAME
8 dtrace \- DTrace dynamic tracing compiler and tracing utility
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBdtrace\fR [\fB-32\fR | \fB-64\fR] [\fB-aACeFGHhlqSvVwZ\fR] [\fB-b\fR \fIbufsz\fR] [\fB-c\fR \fIcmd\fR]
13      [\fB-D\fR \fIname\fR [\fI=value\fR]] [\fB-I\fR \fIpath\fR] [\fB-L\fR \fIpath\fR] [\fB-o\fR \fIoutput\fR]
14      [\fB-s\fR \fIscript\fR] [\fB-U\fR \fIname\fR] [\fB-x\fR \fIarg\fR [\fI=val\fR]]
15      [\fB-X\fR a | c | s | t] [\fB-p\fR \fIpid\fR]
16      [\fB-P\fR \fIprovider\fR [[\fIpredicate\fR] \fIaction\fR]]
17      [\fB-m\fR [\fIprovider:\fR] \fImodule\fR [[\fIpredicate\fR] \fIaction\fR]]
18      [\fB-f\fR [[\fIprovider:\fR] \fImodule:\fR] \fIfunction\fR [[\fIpredicate\fR] \fIaction\fR]]
19      [\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR [[\fIpredicate\fR] \fIaction\fR]]
20      [\fB-i\fR \fIprobe-id\fR [[\fIpredicate\fR] \fIaction\fR]]
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 DTrace is a comprehensive dynamic tracing framework for the Solaris Operating
27 System. DTrace provides a powerful infrastructure that permits administrators,
28 developers, and service personnel to concisely answer arbitrary questions about
29 the behavior of the operating system and user programs.
30 .sp
31 .LP
32 The \fISolaris Dynamic Tracing Guide\fR describes how to use DTrace to observe,
33 debug, and tune system behavior. Refer to this book for a detailed description
34 of DTrace features, including the bundled DTrace observability tools,
35 instrumentation providers, and the D programming language.
36 .sp
37 .LP
38 The \fBdtrace\fR command provides a generic interface to the essential services
39 provided by the DTrace facility, including:
40 .RS +4
41 .TP
42 .ie t \(bu
43 .el o
44 Options that list the set of probes and providers currently published by DTrace
45 .RE
46 .RS +4
47 .TP
48 .ie t \(bu
49 .el o
50 Options that enable probes directly using any of the probe description
51 specifiers (provider, module, function, name)
52 .RE
53 .RS +4
54 .TP
55 .ie t \(bu
56 .el o
57 Options that run the D compiler and compile one or more D program files or
58 programs written directly on the command line
59 .RE
60 .RS +4
61 .TP
62 .ie t \(bu
63 .el o
64 Options that generate anonymous tracing programs
65 .RE
66 .RS +4
67 .TP
68 .ie t \(bu
69 .el o
70 Options that generate program stability reports
71 .RE
72 .RS +4
73 .TP
74 .ie t \(bu
75 .el o
76 Options that modify DTrace tracing and buffering behavior and enable additional
77 D compiler features
78 .RE
79 .sp
80 .LP
81 You can use \fBdtrace\fR to create D scripts by using it in a \fB#!\fR
82 declaration to create an interpreter file. You can also use \fBdtrace\fR to
83 attempt to compile D programs and determine their properties without actually
84 enabling tracing using the \fB-e\fR option. See \fBOPTIONS\fR. See the
85 \fISolaris Dynamic Tracing Guide\fR for detailed examples of how to use the
86 \fBdtrace\fR utility to perform these tasks.
87 .SH OPTIONS
88 .sp
89 .LP
90 The arguments accepted by the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, and
91 \fB-i\fR options can include an optional D language \fIpredicate\fR enclosed in
92 slashes \fB//\fR and optional D language \fIaction\fR statement list enclosed
93 in braces \fB{}\fR. D program code specified on the command line must be
94 appropriately quoted to avoid interpretation of meta-characters by the shell.
95 .sp
96 .LP
97 The following options are supported:
98 .sp
99 .ne 2
101 \fB\fB-32\fR | \fB-64\fR\fR
103 .sp .6
104 .RS 4n
105 The D compiler produces programs using the native data model of the operating
106 system kernel. You can use the \fBisainfo\fR \fB-b\fR command to determine the
107 current operating system data model. If the \fB-32\fR option is specified,
108 \fBdtrace\fR forces the D compiler to compile a D program using the 32-bit data
109 model. If the \fB-64\fR option is specified, \fBdtrace\fR forces the D compiler
110 to compile a D program using the 64-bit data model. These options are typically
111 not required as \fBdtrace\fR selects the native data model as the default. The
112 data model affects the sizes of integer types and other language properties. D
113 programs compiled for either data model can be executed on both 32-bit and
114 64-bit kernels. The \fB-32\fR and \fB-64\fR options also determine the ELF file
115 format (ELF32 or ELF64) produced by the \fB-G\fR option.
119 .ne 2
121 \fB\fB-a\fR\fR
123 .sp .6
124 .RS 4n
125 Claim anonymous tracing state and display the traced data. You can combine the
126 \fB-a\fR option with the \fB-e\fR option to force \fBdtrace\fR to exit
127 immediately after consuming the anonymous tracing state rather than continuing
128 to wait for new data. See the \fISolaris Dynamic Tracing Guide\fR for more
129 information about anonymous tracing.
133 .ne 2
135 \fB\fB-A\fR\fR
137 .sp .6
138 .RS 4n
139 Generate \fBdriver.conf\fR(4) directives for anonymous tracing. This option
140 constructs a set of \fBdtrace\fR(7D) configuration file directives to enable
141 the specified probes for anonymous tracing and then exits. By default,
142 \fBdtrace\fR attempts to store the directives to the file
143 \fB/kernel/drv/dtrace.conf\fR. You can modify this behavior if you use the
144 \fB-o\fR option to specify an alternate output file.
148 .ne 2
150 \fB\fB-b\fR \fIbufsz\fR\fR
152 .sp .6
153 .RS 4n
154 Set principal trace buffer size (\fIbufsz\fR). The trace buffer size can
155 include any of the size suffixes \fBk\fR, \fBm\fR, \fBg\fR, or \fBt\fR. If the
156 buffer space cannot be allocated, \fBdtrace\fR attempts to reduce the buffer
157 size or exit depending on the setting of the \fBbufresize\fR property.
161 .ne 2
163 \fB\fB-c\fR \fIcmd\fR\fR
165 .sp .6
166 .RS 4n
167 Run the specified command \fIcmd\fR and exit upon its completion. If more than
168 one \fB-c\fR option is present on the command line, \fBdtrace\fR exits when all
169 commands have exited, reporting the exit status for each child process as it
170 terminates. The process-ID of the first command is made available to any D
171 programs specified on the command line or using the \fB-s\fR option through the
172 \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR
173 for more information on macro variables.
177 .ne 2
179 \fB\fB-C\fR\fR
181 .sp .6
182 .RS 4n
183 Run the C preprocessor \fBcpp\fR(1) over D programs before compiling them. You
184 can pass options to the C preprocessor using the \fB-D\fR, \fB-U\fR, \fB-I\fR,
185 and \fB-H\fR options. You can select the degree of C standard conformance if
186 you use the \fB-X\fR option. For a description of the set of tokens defined by
187 the D compiler when invoking the C preprocessor, see \fB-X\fR.
191 .ne 2
193 \fB\fB-D\fR \fIname\fR \fB[=\fR\fIvalue\fR\fB]\fR\fR
195 .sp .6
196 .RS 4n
197 Define \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR
198 option). If you specify the equals sign (\fB=\fR) and additional \fIvalue\fR,
199 the name is assigned the corresponding value. This option passes the \fB-D\fR
200 option to each \fBcpp\fR invocation.
204 .ne 2
206 \fB\fB-e\fR\fR
208 .sp .6
209 .RS 4n
210 Exit after compiling any requests and consuming anonymous tracing state
211 (\fB-a\fR option) but prior to enabling any probes. You can combine this option
212 with the \fB-a\fR option to print anonymous tracing data and exit. You can also
213 combine this option with D compiler options. This combination verifies that the
214 programs compile without actually executing them and enabling the corresponding
215 instrumentation.
219 .ne 2
221 \fB\fB-f\fR\fB[[\fR\fIprovider\fR\fB:]\fR\fImodule\fR\fB:]\fR\fIfunction\fR\fB[
222 [\fR\fIpredicate\fR\fB]\fR\fIaction\fR\fB]]\fR\fR
224 .sp .6
225 .RS 4n
226 Specify function name to trace or list (\fB-l\fR option). The corresponding
227 argument can include any of the probe description forms
228 \fIprovider:module:function\fR, \fImodule:function\fR, or \fIfunction\fR.
229 Unspecified probe description fields are left blank and match any probes
230 regardless of the values in those fields. If no qualifiers other than
231 \fIfunction\fR are specified in the description, all probes with the
232 corresponding \fIfunction\fR are matched. The \fB-f\fR argument can be suffixed
233 with an optional D probe clause. You can specify more than one \fB-f\fR option
234 on the command line at a time.
238 .ne 2
240 \fB\fB-F\fR\fR
242 .sp .6
243 .RS 4n
244 Coalesce trace output by identifying function entry and return. Function entry
245 probe reports are indented and their output is prefixed with \fB->\fR. Function
246 return probe reports are unindented and their output is prefixed with
247 \fB<-\fR\&. System call entry probe reports are indented and their output is
248 prefixed with \fB=>\fR. System call return probe reports are unindented and
249 their output is prefixed with \fB<=\fR\&.
253 .ne 2
255 \fB\fB-G\fR\fR
257 .sp .6
258 .RS 4n
259 Generate an ELF file containing an embedded DTrace program. The DTrace probes
260 specified in the program are saved inside of a relocatable ELF object which can
261 be linked into another program. If the \fB-o\fR option is present, the ELF file
262 is saved using the pathname specified as the argument for this operand. If the
263 \fB-o\fR option is not present and the DTrace program is contained with a file
264 whose name is \fB\fIfilename\fR.d\fR, then the ELF file is saved using the name
265 \fB\fIfilename\fR.o\fR. Otherwise the ELF file is saved using the name
266 \fBd.out\fR.
270 .ne 2
272 \fB\fB-H\fR\fR
274 .sp .6
275 .RS 4n
276 Print the pathnames of included files when invoking \fBcpp\fR(1) (enabled using
277 the \fB-C\fR option). This option passes the \fB-H\fR option to each \fBcpp\fR
278 invocation, causing it to display the list of pathnames, one for each line, to
279 \fBstderr\fR.
283 .ne 2
285 \fB\fB-h\fR\fR
287 .sp .6
288 .RS 4n
289 Generate a header file containing macros that correspond to probes in the
290 specified provider definitions. This option should be used to generate a header
291 file that is included by other source files for later use with the \fB-G\fR
292 option. If the \fB-o\fR option is present, the header file is saved using the
293 pathname specified as the argument for that option. If the \fB-o\fR option is
294 not present and the DTrace program is contained with a file whose name is
295 \fIfilename\fR\fB\&.d\fR, then the header file is saved using the name
296 \fIfilename\fR\fB\&.h\fR.
300 .ne 2
302 \fB\fB-i\fR \fIprobe-id\fR\fB[[\fR\fIpredicate\fR] \fIaction\fR\fB]\fR\fR
304 .sp .6
305 .RS 4n
306 Specify probe identifier (\fIprobe-id\fR) to trace or list (\fB-l\fR option).
307 You can specify probe IDs using decimal integers as shown by \fBdtrace\fR
308 \fB-l\fR. The \fB-i\fR argument can be suffixed with an optional D probe
309 clause. You can specify more than one \fB-i\fR option at a time.
313 .ne 2
315 \fB\fB-I\fR \fIpath\fR\fR
317 .sp .6
318 .RS 4n
319 Add the specified directory \fIpath\fR to the search path for \fB#include\fR
320 files when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This
321 option passes the \fB-I\fR option to each \fBcpp\fR invocation. The specified
322 \fIpath\fR is inserted into the search path ahead of the default directory
323 list.
327 .ne 2
329 \fB\fB-L\fR \fIpath\fR\fR
331 .sp .6
332 .RS 4n
333 Add the specified directory \fIpath\fR to the search path for DTrace libraries.
334 DTrace libraries are used to contain common definitions that can be used when
335 writing D programs. The specified \fIpath\fR is added after the default library
336 search path.
340 .ne 2
342 \fB\fB-l\fR\fR
344 .sp .6
345 .RS 4n
346 List probes instead of enabling them. If the \fB-l\fR option is specified,
347 \fBdtrace\fR produces a report of the probes matching the descriptions given
348 using the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, \fB-i\fR, and \fB-s\fR
349 options. If none of these options are specified, this option lists all probes.
353 .ne 2
355 \fB\fB-m\fR [[\fIprovider:\fR] \fImodule:\fR [[\fIpredicate\fR]
356 \fIaction\fR]]\fR
358 .sp .6
359 .RS 4n
360 Specify module name to trace or list (\fB-l\fR option). The corresponding
361 argument can include any of the probe description forms \fIprovider:module\fR
362 or \fImodule\fR. Unspecified probe description fields are left blank and match
363 any probes regardless of the values in those fields. If no qualifiers other
364 than \fImodule\fR are specified in the description, all probes with a
365 corresponding \fImodule\fR are matched. The \fB-m\fR argument can be suffixed
366 with an optional D probe clause. More than one \fB-m\fR option can be specified
367 on the command line at a time.
371 .ne 2
373 \fB\fB-n\fR [[[\fIprovider:\fR] \fImodule:\fR] \fIfunction:\fR] \fIname\fR
374 [[\fIpredicate\fR] \fIaction\fR]\fR
376 .sp .6
377 .RS 4n
378 Specify probe name to trace or list (\fB-l\fR option). The corresponding
379 argument can include any of the probe description forms
380 \fIprovider:module:function:name\fR, \fImodule:function:name\fR,
381 \fIfunction:name\fR, or \fIname\fR. Unspecified probe description fields are
382 left blank and match any probes regardless of the values in those fields. If no
383 qualifiers other than \fIname\fR are specified in the description, all probes
384 with a corresponding \fIname\fR are matched. The \fB-n\fR argument can be
385 suffixed with an optional D probe clause. More than one \fB-n\fR option can be
386 specified on the command line at a time.
390 .ne 2
392 \fB\fB-o\fR \fIoutput\fR\fR
394 .sp .6
395 .RS 4n
396 Specify the \fIoutput\fR file for the \fB-A\fR , \fB-G\fR,  \fB-h\fR, and
397 \fB-l\fR options, or for the traced data itself. If the \fB-A\fR option is
398 present and \fB-o\fR is not present, the default output file is
399 \fB/kernel/drv/dtrace.conf\fR. If the \fB-G\fR option is present and the
400 \fB-s\fR option's argument is of the form \fB\fIfilename\fR.d\fR and \fB-o\fR
401 is not present, the default output file is \fB\fIfilename\fR.o\fR. Otherwise
402 the default output file is \fBd.out\fR.
406 .ne 2
408 \fB\fB-p\fR \fIpid\fR\fR
410 .sp .6
411 .RS 4n
412 Grab the specified process-ID \fIpid\fR, cache its symbol tables, and exit upon
413 its completion. If more than one \fB-p\fR option is present on the command
414 line, \fBdtrace\fR exits when all commands have exited, reporting the exit
415 status for each process as it terminates. The first process-ID is made
416 available to any D programs specified on the command line or using the \fB-s\fR
417 option through the \fB$target\fR macro variable. Refer to the \fISolaris
418 Dynamic Tracing Guide\fR for more information on macro variables.
422 .ne 2
424 \fB\fB-P\fR \fIprovider\fR \fB[[\fR\fIpredicate\fR\fB]\fR \fIaction\fR]\fR
426 .sp .6
427 .RS 4n
428 Specify provider name to trace or list (\fB-l\fR option). The remaining probe
429 description fields module, function, and name are left blank and match any
430 probes regardless of the values in those fields. The \fB-P\fR argument can be
431 suffixed with an optional D probe clause. You can specify more than one
432 \fB-P\fR option on the command line at a time.
436 .ne 2
438 \fB\fB-q\fR\fR
440 .sp .6
441 .RS 4n
442 Set quiet mode. \fBdtrace\fR suppresses messages such as the number of probes
443 matched by the specified options and D programs and does not print column
444 headers, the CPU ID, the probe ID, or insert newlines into the output. Only
445 data traced and formatted by D program statements such as \fBtrace()\fR and
446 \fBprintf()\fR is displayed to \fBstdout\fR.
450 .ne 2
452 \fB\fB-s\fR\fR
454 .sp .6
455 .RS 4n
456 Compile the specified D program source file. If the \fB-e\fR option is present,
457 the program is compiled but instrumentation is not enabled. If the \fB-l\fR
458 option is present, the program is compiled and the set of probes matched by it
459 is listed, but instrumentation is not enabled. If none of \fB-e\fR, \fB-l\fR,
460 \fB-G\fR, or \fB-A\fR are present, the instrumentation specified by the D
461 program is enabled and tracing begins.
465 .ne 2
467 \fB\fB-S\fR\fR
469 .sp .6
470 .RS 4n
471 Show D compiler intermediate code. The D compiler produces a report of the
472 intermediate code generated for each D program to \fBstderr\fR.
476 .ne 2
478 \fB\fB-U\fR \fIname\fR\fR
480 .sp .6
481 .RS 4n
482 Undefine the specified \fIname\fR when invoking \fBcpp\fR(1) (enabled using the
483 \fB-C\fR option). This option passes the \fB-U\fR option to each \fBcpp\fR
484 invocation.
488 .ne 2
490 \fB\fB-v\fR\fR
492 .sp .6
493 .RS 4n
494 Set verbose mode. If the \fB-v\fR option is specified, \fBdtrace\fR produces a
495 program stability report showing the minimum interface stability and dependency
496 level for the specified D programs. DTrace stability levels are explained in
497 further detail in the \fISolaris Dynamic Tracing Guide\fR.
501 .ne 2
503 \fB\fB-V\fR\fR
505 .sp .6
506 .RS 4n
507 Report the highest D programming interface version supported by \fBdtrace\fR.
508 The version information is printed to \fBstdout\fR and the \fBdtrace\fR command
509 exits. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information
510 about DTrace versioning features.
514 .ne 2
516 \fB\fB-w\fR\fR
518 .sp .6
519 .RS 4n
520 Permit destructive actions in D programs specified using the \fB-s\fR,
521 \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options. If the \fB-w\fR
522 option is not specified, \fBdtrace\fR does not permit the compilation or
523 enabling of a D program that contains destructive actions.
527 .ne 2
529 \fB\fB-x\fR \fIarg\fR [\fI=val\fR]\fR
531 .sp .6
532 .RS 4n
533 Enable or modify a DTrace runtime option or D compiler option. The list of
534 options is found in the \fISolaris Dynamic Tracing Guide\fR. Boolean options
535 are enabled by specifying their name. Options with values are set by separating
536 the option name and value with an equals sign (\fB=\fR).
540 .ne 2
542 \fB\fB-X\fR \fBa | c | s | t\fR\fR
544 .sp .6
545 .RS 4n
546 Specify the degree of conformance to the ISO C standard that should be selected
547 when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). The \fB-X\fR
548 option argument affects the value and presence of the \fB__STDC__\fR macro
549 depending upon the value of the argument letter.
551 The \fB-X\fR option supports the following arguments:
553 .ne 2
555 \fB\fBa\fR\fR
557 .RS 5n
558 Default. ISO C plus K&R compatibility extensions, with semantic changes
559 required by ISO C. This is the default mode if \fB-X\fR is not specified. The
560 predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in
561 conjunction with the \fB-Xa\fR option.
565 .ne 2
567 \fB\fBc\fR\fR
569 .RS 5n
570 Conformance. Strictly conformant ISO C, without K&R C compatibility extensions.
571 The predefined macro \fB__STDC__\fR has a value of 1 when \fBcpp\fR is invoked
572 in conjunction with the \fB-Xc\fR option.
576 .ne 2
578 \fB\fBs\fR\fR
580 .RS 5n
581 K&R C only. The macro \fB__STDC__\fR is not defined when \fBcpp\fR is invoked
582 in conjunction with the \fB-Xs\fR option.
586 .ne 2
588 \fB\fBt\fR\fR
590 .RS 5n
591 Transition. ISO C plus K&R C compatibility extensions, without semantic changes
592 required by ISO C. The predefined macro \fB__STDC__\fR has a value of 0 when
593 \fBcpp\fR is invoked in conjunction with the \fB-Xt\fR option.
596 As the \fB-X\fR option only affects how the D compiler invokes the C
597 preprocessor, the \fB-Xa\fR and \fB-Xt\fR options are equivalent from the
598 perspective of D and both are provided only to ease re-use of settings from a C
599 build environment.
601 Regardless of the \fB-X\fR mode, the following additional C preprocessor
602 definitions are always specified and valid in all modes:
603 .RS +4
605 .ie t \(bu
606 .el o
607 \fB__sun\fR
609 .RS +4
611 .ie t \(bu
612 .el o
613 \fB__unix\fR
615 .RS +4
617 .ie t \(bu
618 .el o
619 \fB__SVR4\fR
621 .RS +4
623 .ie t \(bu
624 .el o
625 \fB__sparc\fR (on SPARC systems only)
627 .RS +4
629 .ie t \(bu
630 .el o
631 \fB__sparcv9\fR (on SPARC systems only when 64-bit programs are compiled)
633 .RS +4
635 .ie t \(bu
636 .el o
637 \fB__i386\fR (on x86 systems only when 32-bit programs are compiled)
639 .RS +4
641 .ie t \(bu
642 .el o
643 \fB__amd64\fR (on x86 systems only when 64-bit programs are compiled)
645 .RS +4
647 .ie t \(bu
648 .el o
649 \fB__\fI`uname -s`\fR_\fI`uname -r`\fR\fR (for example, \fB__SunOS_5_10\fR)
651 .RS +4
653 .ie t \(bu
654 .el o
655 \fB__SUNW_D=1\fR
657 .RS +4
659 .ie t \(bu
660 .el o
661 \fB__SUNW_D_VERSION=0x\fIMMmmmuuu\fR\fR
663 Where \fIMM\fR is the major release value in hexadecimal, \fImmm\fR is the
664 minor release value in hexadecimal, and \fIuuu\fR is the micro release value in
665 hexadecimal. Refer to the \fISolaris Dynamic Tracing Guide\fR for more
666 information about DTrace versioning.
671 .ne 2
673 \fB\fB-Z\fR\fR
675 .sp .6
676 .RS 4n
677 Permit probe descriptions that match zero probes. If the \fB-Z\fR option is not
678 specified, \fBdtrace\fR reports an error and exits if any probe descriptions
679 specified in D program files (\fB-s\fR option) or on the command line
680 (\fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options) contain
681 descriptions that do not match any known probes.
684 .SH OPERANDS
687 You can specify zero or more additional arguments on the \fBdtrace\fR command
688 line to define a set of macro variables (\fB$1\fR, \fB$2\fR, and so forth). The
689 additional arguments can be used in D programs specified using the \fB-s\fR
690 option or on the command line. The use of macro variables is described further
691 in the \fISolaris Dynamic Tracing Guide\fR.
692 .SH EXIT STATUS
695 The following exit values are returned:
697 .ne 2
699 \fB0\fR
701 .RS 5n
702 Successful completion.
704 For D program requests, an exit status of \fB0\fR indicates that programs were
705 successfully compiled, probes were successfully enabled, or anonymous state was
706 successfully retrieved. \fBdtrace\fR returns \fB0\fR even if the specified
707 tracing requests encountered errors or drops.
711 .ne 2
713 \fB\fB1\fR\fR
715 .RS 5n
716 An error occurred.
718 For D program requests, an exit status of \fB1\fR indicates that program
719 compilation failed or that the specified request could not be satisfied.
723 .ne 2
725 \fB\fB2\fR\fR
727 .RS 5n
728 Invalid command line options or arguments were specified.
731 .SH ATTRIBUTES
734 See \fBattributes\fR(5) for descriptions of the following attributes:
739 box;
740 c | c
741 l | l .
742 ATTRIBUTE TYPE  ATTRIBUTE VALUE
744 Interface Stability     See below.
749 The command-line syntax is Committed. The human-readable output is Uncommitted.
750 .SH SEE ALSO
753 \fBcpp\fR(1), \fBisainfo\fR(1), \fBssh\fR(1), \fBlibdtrace\fR(3LIB),
754 \fBdriver.conf\fR(4), \fBattributes\fR(5), \fBdtrace\fR(7D)
757 \fISolaris Dynamic Tracing Guide\fR
758 .SH USAGE
761 When using the \fB-p\fR flag, \fBdtrace\fR stops the target processes while it
762 is inspecting them and reporting results. A process can do nothing while it is
763 stopped. This means that, if , for example, the X server is inspected by
764 \fBdtrace\fR running in a window under the X server's control, the whole window
765 system can become deadlocked, because the \fBproc\fR tool would be attempting
766 to display its results to a window that cannot be refreshed. In such a case,
767 logging in from another system using \fBssh\fR(1) and killing the offending
768 \fBproc\fR tool clears the deadlock.