No Bad Dogs How to Make a Dog-Slow System Sit Up and Speak
--from WIKI
Bryan M. Cantrill is an engineer at Sun Microsystems. Cantrill graduated from Brown University, B.Sc. in computer science. He was born in Colorado where he attained the rank of Eagle Scout.
In 2005 Bryan Cantrill was named one of the 35 Top Young Innovators by Technology Review, MIT's magazine. Cantrill was included in the TR35 list for his development of DTrace, a function of the OS Solaris 10 that provides a non-invasive means for real-time tracing and diagnosis of software.
from [http://en.wikipedia.org/wiki/DTrace]
DTrace is a comprehensive dynamic tracing framework created by Sun Microsystems. It was released under the Common Development and Distribution License (CDDL) in January 2005 and included in Sun's Solaris 10 for troubleshooting system problems in real time. DTrace was the first component of the OpenSolaris project to have its source code released under the CDDL.
DTrace is designed to give operational insights that allow users to tune and troubleshoot applications and the OS itself. Special consideration has been taken to make it safe to use in a production environment. For example, there is minimal probe effect when tracing is underway, and no performance impact associated with any disabled probe; this is important since there are tens of thousands of DTrace probes that can be enabled.
Tracing programs (also referred to as scripts) can be written using the D programming language (not to be confused with other programming languages named "D"). The language is a subset of C with added functions and variables specific to tracing. D programs most resemble awk programs in structure; they consist of a set of actions rather than a top-down structured program. In a DTrace program, one or more probes (instrumentation points) are enabled; whenever the condition for the probe is met, the action associated with the probe in the DTrace program is executed (the probe "fires").
DTrace was designed and implemented by Bryan Cantrill, Mike Shapiro, and Adam Leventhal. The authors received recognition in 2005 for the innovations in DTrace from InfoWorld and Technology Review.[1][2] DTrace won the top prize in the Wall Street Journal's 2006 Technology Innovation Awards competition.[3]
DTrace implementations require tight integration with the operating system kernel. Although DTrace was initially written for Solaris, its source code is freely available as part of the OpenSolaris project, and work is in progress to port it to FreeBSD (in which there has been initial success[4] as a substitute for the ktrace utility; further work on DTrace integration into FreeBSD is being sponsored by Cisco) and QNX [5]. Apple has included DTrace in Mac OS X 10.5 "Leopard" with a GUI called Instruments;[6] Unlike other platforms that DTrace is supported on, Mac OS X has a flag (P_LNOATTACH) that a program may set that disallows tracing of that process by debugging utilities such as DTrace and gdb. This can affect tracing of other system information, as unrelated probes that should fire while a program with this flag set is running will fail to do so.[7]
Using DTrace
Typical usage of DTrace consists of invoking it from the command line, providing one or more arguments. Here a list of command line with examples arguments.
# New processes with arguments,
dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }'
# Files opened by process,
dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'
# Syscall count by program,
dtrace -n 'syscall:::entry { @num[execname] = count(); }'
# Syscall count by syscall,
dtrace -n 'syscall:::entry { @num[probefunc] = count(); }'
# Syscall count by process,
dtrace -n 'syscall:::entry { @num[pid,execname] = count(); }'
# Disk size by process,
dtrace -n 'io:::start { printf("%d %s %d",pid,execname,args[0]->b_bcount); }'
# Pages paged in by process,
dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }'
No comments:
Post a Comment