Go to main content
oracle home
Oracle
®
Solaris 11.3 DTrace (Dynamic Tracing) Guide
Exit Print View
Search Term
Search Scope:
This Document
Entire Library
» ...
Documentation Home
»
Oracle Solaris 11.3 Information Library
»
Oracle
®
Solaris 11.3 DTrace ...
Updated: July 2018
Oracle
®
Solaris 11.3 DTrace (Dynamic Tracing) Guide
Document Information
Using This Documentation
Product Documentation Library
Feedback
Chapter 1 About DTrace
Getting Started With DTrace
DTrace Providers and Probes
Chapter 2 D Programming Language
D Program Structure
Probe Clauses and Declarations
Probe Descriptions
Predicates in DTrace
Probe Actions
Order of Executing DTrace Actions
Use of the C Preprocessor
Compilation and Instrumentation in DTrace
Variables and Arithmetic Expressions in DTrace
Predicates in D Programming Language
Output Formatting in DTrace
Arrays in DTrace
External Symbols and Types in DTrace
Types, Operators, and Expressions in DTrace
Identifier Names and Keywords
Data Types and Sizes
Constants in DTrace
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Assignment Operators
Increment and Decrement Operators
Conditional Expressions
Type Conversions
Precedence DTrace Rules
Variables in DTrace
Scalar Variables
Associative Arrays
Thread-Local Variables
Clause-Local Variables
Built-In Variables
External Variables
Pointers and Arrays in DTrace
Pointers and Addresses
Pointer Safety
Array Declarations and Storage
Pointer and Array Relationship
Pointer Arithmetic
Generic Pointers
Multi-Dimensional Arrays
Pointers to DTrace Objects
Pointers and Address Spaces
Strings in DTrace
String Representation
String Constants
String Assignment
String Conversion
String Comparison
Structs and Unions in DTrace
Structs in DTrace
Pointers to Structs
Union Types in DTrace
Member Sizes and Offsets
Bit Fields
Type and Constant Definitions in DTrace
typedef Keyword
Enumerations in DTrace
Inlines in DTrace
Type Namespaces in DTrace
Chapter 3 DTrace Aggregations
Aggregating Functions
About Aggregations
Printing Aggregations
Data Normalization
Clearing Aggregations
Sorting Aggregations
Truncating Aggregations
Minimizing Drops
Chapter 4 DTrace Actions and Subroutines
DTrace Actions
DTrace Default Action
DTrace Data Recording Actions
clear Action
denormalize Action
freopen Action
ftruncate Action
func Action
jstack Action
mod Action
normalize Action
print Action
printa Action
printf Action
setopt Action
stack Action
sym Action
trace Action
tracemem Action
trunc Action
uaddr Action
ufunc Action
umod Action
ustack Action
usym Action
DTrace Destructive Actions
Process Destructive Actions
copyout Action
copyoutstr Action
raise Action
stop Action
system Action
Kernel Destructive Actions
breakpoint Action
chill Action
panic Action
DTrace Special Actions
Speculative Actions
exit Action
DTrace Subroutines
alloca Subroutine
basename Subroutine
bcopy Subroutine
cleanpath Subroutine
copyin Subroutine
copyinstr Subroutine
copyinto Subroutine
dirname Subroutine
inet_ntoa Subroutine
inet_ntoa6 Subroutine
inet_ntop Subroutine
msgdsize Subroutine
msgsize Subroutine
mutex_owned Subroutine
mutex_owner Subroutine
mutex_type_adaptive Subroutine
progenyof Subroutine
rand Subroutine
rw_iswriter Subroutine
rw_write_held Subroutine
speculation Subroutine
strchr Subroutine
strjoin Subroutine
strlen Subroutine
strrchr Subroutine
strstr Subroutine
strtok Subroutine
Chapter 5 DTrace Buffers and Buffering
Principal Buffers
Principal Buffer Policies
switch Policy
fill Policy
fill Policy and END Probes
ring Policy
Other Buffers
Buffer Sizes
Buffer Resizing Policy
Chapter 6 Output Formatting in DTrace
printf() Function
Conversion Specifications
Flag Specifiers
Width and Precision Specifiers
Size Prefixes
Conversion Formats
printa() Function
trace Default Format
Chapter 7 Speculative Tracing in DTrace
Speculation Interfaces
Creating a Speculation
Using a Speculation
Committing a Speculation
Discarding a Speculation
Speculation Example
Speculation Options and Tuning
Chapter 8 dtrace Utility
dtrace Command Description
dtrace Command Options
dtrace Command Operands
dtrace Command Exit Status Values
Chapter 9 Scripting in DTrace
Interpreter Files
Macro Variables
Macro Arguments
Target Process ID
Chapter 10 DTrace Options and Tunables
DTrace Consumer Options
Modifying DTrace Options
Chapter 11 DTrace Providers
cpc Provider
cpc Probes
cpc Probe Arguments
Probe Availability
Probe Creation
cpc Probe and Existing Tools
Examples of cpc Provider Usage
cpc Stability
dtrace Provider
BEGIN Probe
END Probe
ERROR Probe
dtrace Provider Stability
fasttrap Provider
fasttrap Probes
fasttrap Stability
fbt Provider
fbt Probes
fbt Probe Arguments
fbt entry Probes
fbt return Probes
fbt Examples
fbt and Tail-Call Optimization
fbt and Assembly Functions
fbt and Instruction Set Limitations
x86 Limitations With fbt
SPARC Limitations With fbt
Breakpoint Interaction and fbt
fbt and Module Loading
FBT Stability Mechanism
fpuinfo Provider
fpuinfo Probes
fpuinfo Arguments
fpuinfo Stability
io Provider
io Probes
io Probe Arguments
io bufinfo_t Structure
io devinfo_t Structure
io fileinfo_t Structure
io Examples
io Stability
lockstat Provider
lockstat Overview
lockstat Adaptive Lock Probes
lockstat Spin Lock Probes
lockstat Thread Locks
lockstat Readers/Writer Lock Probes
lockstat Stability
mib Provider
mib Probes
mib Probe Arguments
mib Stability
pid Provider
Naming pid Probes
Function Boundary Probes
pid entry Probes
pid return Probes
pid Function Offset Probes
pid Stability
plockstat Provider
plockstat Overview
plockstat Mutex Probes
plockstat Reader/Writer Lock Probes
plockstat Stability
proc Provider
proc Probes
proc Probe Arguments
proc lwpsinfo_t Argument Type
proc psinfo_t Argument Type
Using the proc Provider
proc exec Probe
proc start and exit Probes
Using proc lwp-start and proc lwp-exit
Using proc signal-send
proc Stability
profile Provider
profile-n Probes
tick-n Probes
profile Probe Arguments
profile Timer Resolution
profile Probe Creation
profile Stability
sched Provider
sched Probes
sched Probe Arguments
sched cpuinfo_t Structure
Using the sched Provider
sched on-cpu and off-cpu Probes
sched CPU Examples
sleep and wakeup
preempt and remain-cpu
Using sched change-pri
sched tick Examples
cpucaps-sleep and cpucaps-wakeup
sched Stability
sdt Provider
sdt Probes
sdt Examples
Creating SDT Probes
Declaring SDT Probes
sdt Probe Arguments
sdt Stability
syscall Provider
syscall Probes
System Call Anachronisms
Subcoded System Calls
New System Calls
Deleted System Calls
Large File System Calls
Private System Calls
syscall Arguments
syscall Stability
sysinfo Provider
sysinfo Probes
sysinfo Probe Arguments
sysinfo Example
sysinfo Stability
vminfo Provider
vminfo Probes
vminfo Arguments
vminfo Example
vminfo Stability
Network and Network Service Protocol Providers
ip Provider
ip Probes
ip Probe Arguments
ip Provider Examples
ip Provider Stability
iscsi Provider
iscsi Probes
iscsi Probe Arguments
iscsi Types
iscsi Examples
nfsv3 Server Provider
nfsv3 Probe Arguments
nfsv3 Probes
NFSv3 Examples
nfsv4 Provider
nfsv4 Probe Arguments
NFSv4 Probes
NFSv4 Examples
srp Provider
srp Probes
srp Types
srp Examples
tcp Provider
TCP Probes
tcp Probe Arguments
TCP Examples
TCP Stability
udp Provider
UDP Probes
UDP Arguments
UDP Examples
udp Stability
Chapter 12 User Process Tracing
copyin and copyinstr Subroutines
Subroutine Examples
Avoiding Errors
Eliminating dtrace Interference
syscall Provider
ustack Action
uregs[] Array
pid Provider
User Function Boundary Tracing
Tracing Arbitrary Instructions
Chapter 13 Statically Defined Tracing for User Applications
Choosing the Probe Points
Adding Probes to an Application
Defining Providers and Probes
Adding Probes to Application Code
Building Applications With Probes
Chapter 14 Security in DTrace
Privileges in Oracle Solaris
Privileged Use of DTrace
dtrace_proc Privilege
dtrace_user Privilege
dtrace_kernel Privilege
Users Granted All Privileges
Chapter 15 Anonymous Tracing in DTrace
Anonymous Enablings
Claiming Anonymous State
Anonymous Tracing Examples
Chapter 16 Postmortem Tracing in DTrace
Displaying DTrace Consumers
Displaying Trace Data
Chapter 17 Performance Considerations in DTrace
Limit Enabled Probes
Use Aggregations
Use Cacheable Predicates
Chapter 18 DTrace Stability Mechanisms
Stability Levels
Stability Dependency Classes
Stability Interface Attributes
Stability Interfaces Defined for USDT Providers
Stability Computations and Reports
Stability Enforcement
Chapter 19 DTrace Translators
Translator Declarations
Translate Operator
Process Model Translators
Stable Translations
Chapter 20 Program Versioning in DTrace
Versions and Releases
Versioning Options
Provider Versioning
Index
Index Numbers and Symbols
Index A
Index B
Index C
Index D
Index E
Index F
Index I
Index J
Index K
Index L
Index M
Index N
Index O
Index P
Index R
Index S
Index T
Index U
Index V
Index X
Language:
English
Oracle
®
Solaris 11.3 DTrace (Dynamic Tracing) Guide
July 2018
Describes how to use DTrace and details the DTrace providers.
Document Information
Using This Documentation
Product Documentation Library
Feedback
1 About DTrace
Getting Started With DTrace
DTrace Providers and Probes
2 D Programming Language
D Program Structure
Probe Clauses and Declarations
Probe Descriptions
Predicates in DTrace
Probe Actions
Order of Executing DTrace Actions
Use of the C Preprocessor
Compilation and Instrumentation in DTrace
Variables and Arithmetic Expressions in DTrace
Predicates in D Programming Language
Output Formatting in DTrace
Arrays in DTrace
External Symbols and Types in DTrace
Types, Operators, and Expressions in DTrace
Identifier Names and Keywords
Data Types and Sizes
Constants in DTrace
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Assignment Operators
Increment and Decrement Operators
Conditional Expressions
Type Conversions
Precedence DTrace Rules
Variables in DTrace
Scalar Variables
Associative Arrays
Thread-Local Variables
Clause-Local Variables
Built-In Variables
External Variables
Pointers and Arrays in DTrace
Pointers and Addresses
Pointer Safety
Array Declarations and Storage
Pointer and Array Relationship
Pointer Arithmetic
Generic Pointers
Multi-Dimensional Arrays
Pointers to DTrace Objects
Pointers and Address Spaces
Strings in DTrace
String Representation
String Constants
String Assignment
String Conversion
String Comparison
Structs and Unions in DTrace
Structs in DTrace
Pointers to Structs
Union Types in DTrace
Member Sizes and Offsets
Bit Fields
Type and Constant Definitions in DTrace
typedef Keyword
Enumerations in DTrace
Inlines in DTrace
Type Namespaces in DTrace
3 DTrace Aggregations
Aggregating Functions
About Aggregations
Printing Aggregations
Data Normalization
Clearing Aggregations
Sorting Aggregations
Truncating Aggregations
Minimizing Drops
4 DTrace Actions and Subroutines
DTrace Actions
DTrace Default Action
DTrace Data Recording Actions
clear Action
denormalize Action
freopen Action
ftruncate Action
func Action
jstack Action
mod Action
normalize Action
print Action
printa Action
printf Action
setopt Action
stack Action
sym Action
trace Action
tracemem Action
trunc Action
uaddr Action
ufunc Action
umod Action
ustack Action
usym Action
DTrace Destructive Actions
Process Destructive Actions
copyout Action
copyoutstr Action
raise Action
stop Action
system Action
Kernel Destructive Actions
breakpoint Action
chill Action
panic Action
DTrace Special Actions
Speculative Actions
exit Action
DTrace Subroutines
alloca Subroutine
basename Subroutine
bcopy Subroutine
cleanpath Subroutine
copyin Subroutine
copyinstr Subroutine
copyinto Subroutine
dirname Subroutine
inet_ntoa Subroutine
inet_ntoa6 Subroutine
inet_ntop Subroutine
msgdsize Subroutine
msgsize Subroutine
mutex_owned Subroutine
mutex_owner Subroutine
mutex_type_adaptive Subroutine
progenyof Subroutine
rand Subroutine
rw_iswriter Subroutine
rw_write_held Subroutine
speculation Subroutine
strchr Subroutine
strjoin Subroutine
strlen Subroutine
strrchr Subroutine
strstr Subroutine
strtok Subroutine
5 DTrace Buffers and Buffering
Principal Buffers
Principal Buffer Policies
switch Policy
fill Policy
fill Policy and END Probes
ring Policy
Other Buffers
Buffer Sizes
Buffer Resizing Policy
6 Output Formatting in DTrace
printf() Function
Conversion Specifications
Flag Specifiers
Width and Precision Specifiers
Size Prefixes
Conversion Formats
printa() Function
trace Default Format
7 Speculative Tracing in DTrace
Speculation Interfaces
Creating a Speculation
Using a Speculation
Committing a Speculation
Discarding a Speculation
Speculation Example
Speculation Options and Tuning
8 dtrace Utility
dtrace Command Description
dtrace Command Options
dtrace Command Operands
dtrace Command Exit Status Values
9 Scripting in DTrace
Interpreter Files
Macro Variables
Macro Arguments
Target Process ID
10 DTrace Options and Tunables
DTrace Consumer Options
Modifying DTrace Options
11 DTrace Providers
cpc Provider
cpc Probes
cpc Probe Arguments
Probe Availability
Probe Creation
cpc Probe and Existing Tools
Examples of cpc Provider Usage
cpc Stability
dtrace Provider
BEGIN Probe
END Probe
ERROR Probe
dtrace Provider Stability
fasttrap Provider
fasttrap Probes
fasttrap Stability
fbt Provider
fbt Probes
fbt Probe Arguments
fbt entry Probes
fbt return Probes
fbt Examples
fbt and Tail-Call Optimization
fbt and Assembly Functions
fbt and Instruction Set Limitations
x86 Limitations With fbt
SPARC Limitations With fbt
Breakpoint Interaction and fbt
fbt and Module Loading
FBT Stability Mechanism
fpuinfo Provider
fpuinfo Probes
fpuinfo Arguments
fpuinfo Stability
io Provider
io Probes
io Probe Arguments
io bufinfo_t Structure
io devinfo_t Structure
io fileinfo_t Structure
io Examples
io Stability
lockstat Provider
lockstat Overview
lockstat Adaptive Lock Probes
lockstat Spin Lock Probes
lockstat Thread Locks
lockstat Readers/Writer Lock Probes
lockstat Stability
mib Provider
mib Probes
mib Probe Arguments
mib Stability
pid Provider
Naming pid Probes
Function Boundary Probes
pid entry Probes
pid return Probes
pid Function Offset Probes
pid Stability
plockstat Provider
plockstat Overview
plockstat Mutex Probes
plockstat Reader/Writer Lock Probes
plockstat Stability
proc Provider
proc Probes
proc Probe Arguments
proc lwpsinfo_t Argument Type
proc psinfo_t Argument Type
Using the proc Provider
proc exec Probe
proc start and exit Probes
Using proc lwp-start and proc lwp-exit
Using proc signal-send
proc Stability
profile Provider
profile-n Probes
tick-n Probes
profile Probe Arguments
profile Timer Resolution
profile Probe Creation
profile Stability
sched Provider
sched Probes
sched Probe Arguments
sched cpuinfo_t Structure
Using the sched Provider
sched on-cpu and off-cpu Probes
sched CPU Examples
sleep and wakeup
preempt and remain-cpu
Using sched change-pri
sched tick Examples
cpucaps-sleep and cpucaps-wakeup
sched Stability
sdt Provider
sdt Probes
sdt Examples
Creating SDT Probes
Declaring SDT Probes
sdt Probe Arguments
sdt Stability
syscall Provider
syscall Probes
System Call Anachronisms
Subcoded System Calls
New System Calls
Deleted System Calls
Large File System Calls
Private System Calls
syscall Arguments
syscall Stability
sysinfo Provider
sysinfo Probes
sysinfo Probe Arguments
sysinfo Example
sysinfo Stability
vminfo Provider
vminfo Probes
vminfo Arguments
vminfo Example
vminfo Stability
Network and Network Service Protocol Providers
ip Provider
ip Probes
ip Probe Arguments
IP pktinfo_t Structure
IP csinfo_t Structure
IP ipinfo_t Structure
IP ifinfo_t Structure
IP ipv4info_t Structure
IP ipv6info_t Structure
ip Provider Examples
Packets by Host Address
Displaying IP Sent Size Distribution
Using IP ipio.d
Using IP ipproto.d
ip Provider Stability
iscsi Provider
iscsi Probes
iscsi Probe Arguments
iscsi Types
iscsi Examples
iSCSI One-Line Probes
Using ISCSI iscsiwho.d
Using iscsixfer.d
nfsv3 Server Provider
nfsv3 Probe Arguments
nfsv3 Probes
NFSv3 Examples
Using nfsv3rwsnoop.d Script
Using nfsv3ops.d Script
Using nfsv3fileio.d
Using nfsv3rwtime.d
Using nfsv3io.d
nfsv4 Provider
nfsv4 Probe Arguments
NFSv4 Probes
NFSv4 Examples
Using nfsv4rwsnoop.d
Using nfsv4ops.d
Using nfsv4fileio.d
Using nfsv4rwtime.d
Using nfsv4io.d
srp Provider
srp Probes
srp Probes Overview
Service up/down Event Probes
Remote Port Login/Logout Event Probes
SRP Command Event Probes
SCSI Command Event Probes
Data Transfer Probes
srp Types
srp scsicmd_t Structure
srp conninfo_t Structure
srp_portinfo_t Structure
srp_logininfo_t Structure
srp_taskinfo_t Structure
srp xferinfo_t Structure
srp Examples
srp service.d Structure
srpwho.d Structure
srpsnoop.d Structure
tcp Provider
TCP Probes
tcp Probe Arguments
pktinfo_t Structure
csinfo_t Structure
ipinfo_t Structure
tcpsinfo_t Structure
tcplsinfo_t Structure
tcpinfo_t Structure
TCP Examples
TCP Connections by Host Address
Connections by TCP Port
Who is Connecting to What Over TCP
Who is Not Connecting to What Over TCP
TCP Packets by Host Address
TCP Packets by Local Port
TCP Sent Size Distribution
Using tcpstate.d
Using tcpio.d
TCP Stability
udp Provider
UDP Probes
UDP Arguments
udp pktinfo_t Structure
csinfo_t Structure
udp ipinfo_t Structure
udpsinfo_t Structure
udpinfo_t Structure
UDP Examples
UDP Packets by Host Address
UDP Packets by Local Port
UDP Sent Size Distribution
udp Stability
12 User Process Tracing
copyin and copyinstr Subroutines
Subroutine Examples
Avoiding Errors
Eliminating dtrace Interference
syscall Provider
ustack Action
uregs[] Array
pid Provider
User Function Boundary Tracing
Tracing Arbitrary Instructions
13 Statically Defined Tracing for User Applications
Choosing the Probe Points
Adding Probes to an Application
Defining Providers and Probes
Adding Probes to Application Code
Building Applications With Probes
14 Security in DTrace
Privileges in Oracle Solaris
Privileged Use of DTrace
dtrace_proc Privilege
dtrace_user Privilege
dtrace_kernel Privilege
Users Granted All Privileges
15 Anonymous Tracing in DTrace
Anonymous Enablings
Claiming Anonymous State
Anonymous Tracing Examples
16 Postmortem Tracing in DTrace
Displaying DTrace Consumers
Displaying Trace Data
17 Performance Considerations in DTrace
Limit Enabled Probes
Use Aggregations
Use Cacheable Predicates
18 DTrace Stability Mechanisms
Stability Levels
Stability Dependency Classes
Stability Interface Attributes
Stability Interfaces Defined for USDT Providers
Stability Computations and Reports
Stability Enforcement
19 DTrace Translators
Translator Declarations
Translate Operator
Process Model Translators
Stable Translations
20 Program Versioning in DTrace
Versions and Releases
Versioning Options
Provider Versioning
Index
Numbers and Symbols
A
B
C
D
E
F
I
J
K
L
M
N
O
P
R
S
T
U
V
X