*** Welcome to piglix ***

DTrace

DTrace
Developer(s) Sun Microsystems
Initial release January 2005
Repository github.com/dtrace4linux/linux
Development status Active
Operating system Solaris, macOS, FreeBSD, NetBSD, Linux
Type Tracing
License CDDL
Website dtrace.org

DTrace is a comprehensive dynamic tracing framework created by Sun Microsystems for troubleshooting kernel and application problems on production systems in real time. Originally developed for Solaris, it has since been released under the free Common Development and Distribution License (CDDL) and has been ported to several other Unix-like systems.

DTrace can be used to get a global overview of a running system, such as the amount of memory, CPU time, filesystem and network resources used by the active processes. It can also provide much more fine-grained information, such as a log of the arguments with which a specific function is being called, or a list of the processes accessing a specific file.

As of October 2011, Oracle announced the porting of DTrace from Solaris to Linux, but as of October 13, 2014 it remains officially unavailable. An unofficial DTrace port to Linux is available, although with no changes in licensing terms.

Sun Microsystems designed DTrace to give operational insights that allow users to tune and troubleshoot applications and the OS itself.

Testers write tracing programs (also referred to as scripts) using the D programming language (not to be confused with ). The language, inspired by C, includes added functions and variables specific to tracing. D programs resemble awk programs in structure; they consist of a list of one or more probes (instrumentation points), and each probe is associated with an action. These probes are comparable to a pointcut in aspect-oriented programming. Whenever the condition for the probe is met, the associated action is executed (the probe "fires"). A typical probe might fire when a certain file is opened, or a process is started, or a certain line of code is executed. A probe that fires may analyze the run-time situation by accessing the call stack and context variables and evaluating expressions; it can then print out or log some information, record it in a database, or modify context variables. The reading and writing of context variables allows probes to pass information to each other, allowing them to cooperatively analyze the correlation of different events.


...
Wikipedia

...