Main index | Section 1 | Options |
The dtrace command provides a generic interface to the essential services provided by the DTrace facility, including:
You can use
dtrace
to create D scripts by using it in a shebang declaration to create an
interpreter file.
You can also use
dtrace
to attempt to compile D programs and determine their properties without
actually enabling traces using the
The following options are supported:
| |
The D compiler produces programs using the native data model of the operating
system kernel.
If the
| |
| |
Claim anonymous tracing state and display the traced data.
You can combine the
| |
| |
Generate directives for anonymous tracing and write them to
/boot/dtrace.dof.
This option constructs a set of dtrace configuration file directives to enable
the specified probes for anonymous tracing and then exits.
By default,
dtrace
attempts to store the directives to the file
/boot/dtrace.dof.
This behavior can be modified using the
| |
| |
Set the principal trace buffer size to bufsz. The trace buffer size can include any of the size suffixes k, m, g, or t. If the buffer space cannot be allocated, dtrace attempts to reduce the buffer size or exit depending on the setting of the bufresize property. | |
| |
Run the specified command
cmd
and exit upon its completion.
If more than one
| |
| |
Run the C preprocessor
cpp(1)
over D programs before compiling them.
You can pass options to the C preprocessor using the
| |
| |
Define
name
when invoking
cpp(1)
(enabled using the
| |
| |
Exit after compiling any requests and consuming anonymous tracing state
| |
| |
Oc Ar action Oc
Specify function name to trace or list
| |
| |
Coalesce trace output by identifying function entry and return. Function entry probe reports are indented and their output is prefixed with ‘->’. Function return probe reports are unindented and their output is prefixed with ‘<-’. System call entry probe reports are indented and their output is prefixed with ‘=>’. System call return probe reports are unindented and their output is prefixed with ‘<=’. | |
| |
Generate an ELF file containing an embedded DTrace program.
The DTrace probes specified in the program are saved inside of a relocatable ELF
object which can be linked into another program.
If the
| |
| |
Generate a header file containing macros that correspond to probes in the
specified provider definitions.
This option should be used to generate a header file that is included by other
source files for later use with the
| |
| |
Print the pathnames of included files when invoking
cpp(1)
(enabled using the
| |
| |
Specify probe identifier
( probe-id)
to trace or list
( l
option).
You can specify probe IDs using decimal integers as shown by `dtrace -l`.
The
| |
| |
Add the specified directory
path
to the search path for #include files when invoking
cpp(1)
(enabled using the
| |
| |
List probes instead of enabling them.
If the
| |
| |
Add the specified directory path to the search path for DTrace libraries. DTrace libraries are used to contain common definitions that can be used when writing D programs. The specified path is added after the default library search path. | |
| |
Specify module name to trace or list
| |
| |
Oo Oo Ar predicate Oc Ar action Oc
Specify probe name to trace or list
| |
| |
Specify the
output
file for the
| |
| |
Grab the specified process-ID
pid,
cache its symbol tables, and exit upon its completion.
If more than one
| |
| |
Specify provider name to trace or list
| |
| |
Set quiet mode. dtrace suppresses messages such as the number of probes matched by the specified options and D programs and does not print column headers, the CPU ID, the probe ID, or insert newlines into the output. Only data traced and formatted by D program statements such as ‘dtrace()’ and ‘printf()’ is displayed to standard output. | |
| |
Compile the specified D program source file.
If the
| |
| |
Show D compiler intermediate code. The D compiler produces a report of the intermediate code generated for each D program to standard error. | |
| |
Undefine the specified
name
when invoking
cpp(1)
(enabled using the
| |
| |
Set verbose mode.
If the
| |
| |
Report the highest D programming interface version supported by dtrace. The version information is printed to standard output and the dtrace command exits. | |
| |
Permit destructive actions in D programs specified using the
| |
| |
Enable or modify a DTrace runtime option or D compiler option.
Boolean options are enabled by specifying their name.
Options with values are set by separating the option name and value with an
equals sign (=).
A size argument may be suffixed with one of K, M, G or T (either upper or lower case) to indicate a multiple of Kilobytes, Megabytes, Gigabytes or Terabytes respectively. A time argument may be suffixed with one of ns, nsec, us, usec, ms, msec, s, sec, m, min, h, hour, d, day, hz. If no suffix is specified hz will be used as the unit. | |
aggrate=time | |
Rate of aggregation reading. | |
aggsize=size | |
Size of the aggregation buffer. | |
bufpolicy= fill| switch| ring | |
Specifies the buffer policy for the principal buffer. | |
bufresize= auto| manual | |
Buffer resizing policy. | |
bufsize=size | |
Size of the per-CPU principal buffer.
Same as the
| |
cleanrate=time | |
Cleaning rate. Must be specified in number-per-second with the "hz" suffix. | |
cpu=scalar | |
Specifies the CPU on which to enable tracing. | |
defaultargs | |
Allow references to unspecified macro arguments. | |
destructive | |
Allow destructive actions.
Same as the
| |
dynvarsize=size | |
Size of the dynamic variable space. | |
flowindent | |
Turn on flow indentation.
Same as the
| |
grabanon | |
Claim anonymous state.
Same as the
| |
jstackframes=scalar | |
Number of default stack frames for jstack(). | |
jstackstrsize=scalar | |
Default string space size for jstack(). | |
nspec=scalar | |
Number of speculations. | |
quiet |
Set quiet mode.
Same as the
|
specsize=size | |
Size of the speculation buffer. | |
strsize=size | |
Maximum size of strings. | |
stackframes=scalar | |
Maximum number of kernelspace stack frames to unwind when executing the stack() action. | |
stackindent=scalar | |
Number of whitespace characters to use when indenting stack() and ustack() output. | |
statusrate=time | |
Rate of status checking. | |
switchrate=time | |
Rate of buffer switching. | |
ustackframes=scalar | |
Maximum number of userspace stack frames to unwind when executing the ustack() action. | |
| |
Specify the degree of conformance to the ISO C standard that should be selected
when invoking
cpp(1)
(enabled using the
The
| |
a |
Default.
ISO C plus K&R compatibility extensions, with semantic changes required by ISO
C.
This is the default mode if
|
c |
Conformance.
Strictly conformant ISO C, without K&R C compatibility extensions.
The predefined macro __STDC__ has a value of 1 when
cpp(1)
is invoked in conjunction with the
|
s |
K&R C only.
The macro __STDC__ is not defined when
cpp(1)
is invoked in conjunction with the
|
t |
Transition.
ISO C plus K&R C compatibility extensions, without semantic changes required by
ISO C.
The predefined macro __STDC__ has a value of 0 when
cpp(1)
is invoked in conjunction with the
|
As the
Regardless of the
Where MM is the major release value in hexadecimal, mmm is the minor release value in hexadecimal, and uuu is the micro release value in hexadecimal.
| |
Permit probe descriptions that match zero probes.
If the
| |
/boot/dtrace.dof | |
File for anonymous tracing directives. | |
0 |
Successful completion.
For D program requests, an exit status of 0 indicates that programs were successfully compiled, probes were successfully enabled, or anonymous state was successfully retrieved. dtrace returns 0 even if the specified tracing requests encountered errors or drops. |
1 |
An error occurred.
For D program requests, an exit status of 1 indicates that program compilation failed or that the specified request could not be satisfied. |
2 | Invalid command line options or arguments were specified. |
DTRACE (1) | February 25, 2020 |
Main index | Section 1 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | With features like these, who needs bugs? | ” |
— Henry Spencer |