From owner-svn-doc-head@FreeBSD.ORG Tue Apr 15 17:34:53 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B69D69C6; Tue, 15 Apr 2014 17:34:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A29CD16A6; Tue, 15 Apr 2014 17:34:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FHYrJT047600; Tue, 15 Apr 2014 17:34:53 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FHYrQ3047599; Tue, 15 Apr 2014 17:34:53 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201404151734.s3FHYrQ3047599@svn.freebsd.org> From: Dru Lavigne Date: Tue, 15 Apr 2014 17:34:53 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44564 - head/en_US.ISO8859-1/books/handbook/dtrace X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 17:34:53 -0000 Author: dru Date: Tue Apr 15 17:34:53 2014 New Revision: 44564 URL: http://svnweb.freebsd.org/changeset/doc/44564 Log: Some editorial changes to the DTrace chapter. Will finish the editorial pass on this chapter once I confirm with devs whether PR150255 is correct and get more info on inconsistencies about the Toolkit. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/dtrace/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/dtrace/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/dtrace/chapter.xml Tue Apr 15 16:41:38 2014 (r44563) +++ head/en_US.ISO8859-1/books/handbook/dtrace/chapter.xml Tue Apr 15 17:34:53 2014 (r44564) @@ -43,12 +43,13 @@ that might make this chapter too large. &dtrace; is a remarkable profiling tool, with an impressive array of features for diagnosing system issues. It may also be used to run pre-written scripts to take advantage of its - capabilities. Users may even author their own utilities using + capabilities. Users can author their own utilities using the &dtrace; D Language, allowing them to customize their profiling based on specific needs. - The &dtrace; implementation in &os; provides experimental - support for userland &dtrace;. This feature allows users to + The &os; implementation in provides full support for kernel + &dtrace; and experimental + support for userland &dtrace;. Userland &dtrace; allows users to perform function boundary tracing for userland programs using the pid provider, and to insert static probes into userland programs for later tracing. Some ports, such as @@ -87,11 +88,6 @@ that might make this chapter too large. Have some familiarity with security and how it pertains to &os; (). - - - Understand how to obtain and rebuild the &os; sources - (). - @@ -143,7 +139,7 @@ that might make this chapter too large. /dev/dtrace/dtrace is strictly limited to root. - &dtrace; falls under &sun;'s Common Development and + &dtrace; falls under the Common Development and Distribution License (CDDL) license. To view this license on &os;, see /usr/src/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE @@ -163,12 +159,11 @@ that might make this chapter too large. of &os; or who prefer to statically compile in &dtrace; support should add the following lines to a custom kernel configuration file and recompile the kernel using the instructions in . + linkend="kernelconfig"/>: options KDTRACE_HOOKS options DDB_CTF - Users of the AMD64 architecture should also add this line: @@ -178,13 +173,12 @@ options DDB_CTF FBT. While &dtrace; will work without this option, there will be limited support for function boundary tracing. - Once the &os; system has rebooted into the new kernel, or the &dtrace; kernel modules have been loaded using kldload dtraceall, the system will have support for the Korn shell. This - is needed as the &dtrace;Toolkit has several utilities written + is needed as the &dtrace; Toolkit has several utilities written in ksh. Make sure that the shells/ksh93 package or port is installed. It is also @@ -192,31 +186,33 @@ options DDB_CTF shells/pdksh or shells/mksh. - Finally, obtain the current &dtrace;Toolkit. - FreeBSD 10 includes the &dtrace;Toolkit + Finally, obtain the current &dtrace; Toolkit. + FreeBSD 10 includes the &dtrace; Toolkit in /usr/share/dtrace. - Otherwise, install the &dtrace;Toolkit using the + Otherwise, install the &dtrace; Toolkit using the sysutils/DTraceToolkit package or port. + + The &dtrace; Toolkit includes many scripts in the special + language of &dtrace;. This language is called the D + language and it is very similar + to C++. An in depth discussion of the language is beyond the + scope of this document. It is extensively discussed at http://wikis.oracle.com/display/DTrace/Documentation. Using &dtrace; To view all - probes the administrator may now execute the following + probes, the administrator can execute the following command: &prompt.root; dtrace -l | more - All output is passed to the more - utility as it will quickly overflow the screen buffer. At - this point, &dtrace; should be considered working. It is now - time to review the toolkit. - - The toolkit is a collection of ready-made scripts to run - with &dtrace; to collect system information. There are scripts - to check open files, memory, CPU usage and + The &dtrace; Toolkit is a collection of ready-made scripts + for collecting system information. There are scripts + to check open files, memory, CPU usage, and a lot more. Extract the scripts with the following command: @@ -353,15 +349,4 @@ Elapsed Times for processes csh, getpid() system call used the least amount of time. - - - The D Language - - The &dtrace; Toolkit includes many scripts in the special - language of &dtrace;. This language is called the D - language by &sun; documentation, and it is very similar - to C++. An in depth discussion of the language is beyond the - scope of this document. It is extensively discussed at http://wikis.oracle.com/display/DTrace/Documentation. -