From owner-svn-doc-all@FreeBSD.ORG Tue Apr 15 23:00:33 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 095F1B5A; Tue, 15 Apr 2014 23:00:33 +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 DE08C17E6; Tue, 15 Apr 2014 23:00:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FN0WXH080854; Tue, 15 Apr 2014 23:00:32 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FN0WvE080853; Tue, 15 Apr 2014 23:00:32 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201404152300.s3FN0WvE080853@svn.freebsd.org> From: Dru Lavigne Date: Tue, 15 Apr 2014 23:00:32 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44571 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 23:00:33 -0000 Author: dru Date: Tue Apr 15 23:00:32 2014 New Revision: 44571 URL: http://svnweb.freebsd.org/changeset/doc/44571 Log: Add needed kernel option which addresses PR150255. Clarify the Toolkit and what comes by default in 10.0. Fix a grammo. The Using DTrace section still needs an editorial review. Submitted by: markj 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 22:06:48 2014 (r44570) +++ head/en_US.ISO8859-1/books/handbook/dtrace/chapter.xml Tue Apr 15 23:00:32 2014 (r44571) @@ -162,7 +162,8 @@ that might make this chapter too large. linkend="kernelconfig"/>: options KDTRACE_HOOKS -options DDB_CTF +options DDB_CTF +options DEBUG=-g Users of the AMD64 architecture should also add this line: @@ -175,21 +176,34 @@ options DDB_CTF 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; + kldload dtraceall, the system will need + support for the Korn shell as the &dtrace; Toolkit has several utilities written in ksh. Make sure that the shells/ksh93 package or port is installed. It is also possible to run these tools under shells/pdksh or shells/mksh. - Finally, obtain the current &dtrace; Toolkit. FreeBSD 10 - includes the &dtrace; Toolkit in - /usr/share/dtrace. Otherwise, install the - &dtrace; Toolkit using the + Finally, install the current &dtrace; Toolkit, + a collection of ready-made scripts + for collecting system information. There are scripts to check + open files, memory, CPU usage, and a lot + more. &os; 10 + installs a few of these scripts into + /usr/share/dtrace. On other &os; versions, + or to install the full + &dtrace; Toolkit, use the sysutils/DTraceToolkit package or port. + + The scripts found in + /usr/share/dtrace have been specifically + ported to &os;. Not all of the scripts found in the &dtrace; + Toolkit will work as-is on &os; and some scripts may require + some effort in order for them to work on &os;. + + 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 @@ -206,34 +220,12 @@ options DDB_CTF &prompt.root; dtrace -l | more - 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: - - &prompt.root; gunzip -c DTraceToolkit* | tar xvf - - - Change into that directory with the cd - and change the execution permissions on all files, designated as - those files with lower case names, to - 755. - - All of these scripts will need modifications to their - contents. The ones which refer to - /usr/bin/ksh need that changed to - /usr/local/bin/ksh, the others which use - /usr/bin/sh need to be altered to use - /bin/sh, and finally the ones which use - /usr/bin/perl will need altered to use - /usr/local/bin/perl. - - At the time of this writing only two of the scripts of the - &dtrace; Toolkit are fully supported in &os;: the + This section demonstrates how to use two of the fully supported scripts from the + &dtrace; Toolkit: the hotkernel and - procsystime scripts. These are the two - we will explore in the following parts of this section. + procsystime scripts. - The hotkernel is designed to identify + The hotkernel script is designed to identify which function is using the most kernel time. Run normally, it will produce output similar to the following: