From owner-svn-doc-head@FreeBSD.ORG Tue Apr 15 17:45:55 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 0EC99D42; Tue, 15 Apr 2014 17:45:55 +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 EE5301797; Tue, 15 Apr 2014 17:45:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FHjs4o051930; Tue, 15 Apr 2014 17:45:54 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FHjs0K051929; Tue, 15 Apr 2014 17:45:54 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201404151745.s3FHjs0K051929@svn.freebsd.org> From: Dru Lavigne Date: Tue, 15 Apr 2014 17:45:54 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44565 - 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:45:55 -0000 Author: dru Date: Tue Apr 15 17:45:54 2014 New Revision: 44565 URL: http://svnweb.freebsd.org/changeset/doc/44565 Log: White space fix only. Translators can ignore. 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 17:34:53 2014 (r44564) +++ head/en_US.ISO8859-1/books/handbook/dtrace/chapter.xml Tue Apr 15 17:45:54 2014 (r44565) @@ -41,18 +41,18 @@ that might make this chapter too large. kernel and in userland programs. &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 can author their own utilities using - the &dtrace; D Language, allowing them to customize their - profiling based on specific needs. - + array of features for diagnosing system issues. It may also be + used to run pre-written scripts to take advantage of its + capabilities. Users can author their own utilities using the + &dtrace; D Language, allowing them to customize their profiling + based on specific needs. + 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 + &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 databases/postgres-server and lang/php5 have a &dtrace; option to enable static probes. &os; 10.0-RELEASE has reasonably good userland @@ -85,8 +85,8 @@ that might make this chapter too large. - Have some familiarity with security and how it - pertains to &os; (). + Have some familiarity with security and how it pertains + to &os; (). @@ -106,12 +106,12 @@ that might make this chapter too large. automatically loaded when dtrace is run. - &os; uses the DDB_CTF kernel option - to enable support for loading CTF - data from kernel modules and the kernel itself. - CTF is the &solaris; Compact C Type Format - which encapsulates a reduced form of debugging information - similar to DWARF and the venerable stabs. + &os; uses the DDB_CTF kernel option to + enable support for loading CTF data from + kernel modules and the kernel itself. CTF is + the &solaris; Compact C Type Format which encapsulates a reduced + form of debugging information similar to + DWARF and the venerable stabs. CTF data is added to binaries by the ctfconvert and ctfmerge build tools. The ctfconvert utility parses @@ -122,8 +122,8 @@ that might make this chapter too large. Some different providers exist for &os; than for &solaris;. Most notable is the dtmalloc provider, which - allows tracing malloc() by type in the - &os; kernel. Some of the providers found in &solaris;, such as + allows tracing malloc() by type in the &os; + kernel. Some of the providers found in &solaris;, such as cpc and mib, are not present in &os;. These may appear in future versions of &os;. Moreover, some of the providers available in both operating @@ -139,9 +139,9 @@ that might make this chapter too large. /dev/dtrace/dtrace is strictly limited to root. - &dtrace; falls under the Common Development and - Distribution License (CDDL) license. To view - this license on &os;, see + &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 or view it online at http://www.opensolaris.org/os/licensing. @@ -164,78 +164,73 @@ that might make this chapter too large. options KDTRACE_HOOKS options DDB_CTF - Users of the AMD64 architecture should also add this - line: + Users of the AMD64 architecture should also add this + line: - options KDTRACE_FRAME + options KDTRACE_FRAME - This option provides support for - FBT. While &dtrace; will work without - this option, there will be limited support for - function boundary tracing. + This option provides support for 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 - in ksh. Make sure that the - shells/ksh93 package or port is installed. - It is also - possible to run these tools under + kldload dtraceall, the system will have + support for the Korn shell. This 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 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, obtain the current &dtrace; Toolkit. FreeBSD 10 + includes the &dtrace; Toolkit in + /usr/share/dtrace. 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 can execute the following - command: + To view all probes, the administrator can execute the + following command: &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: + 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 + 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. + /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 hotkernel - and procsystime scripts. These are the two + &dtrace; Toolkit are fully supported in &os;: the + hotkernel and + procsystime scripts. These are the two we will explore in the following parts of this section. The hotkernel is designed to identify @@ -312,11 +307,11 @@ kernel The procsystime script captures and prints the system call time usage for a given PID or process name. In the following - example, a new instance of /bin/csh - was spawned. The procsystime was executed - and remained waiting while a few commands were typed on the - other incarnation of csh. These are the - results of this test: + example, a new instance of /bin/csh was + spawned. The procsystime was executed and + remained waiting while a few commands were typed on the other + incarnation of csh. These are the results of + this test: &prompt.root; ./procsystime -n csh Tracing... Hit Ctrl-C to end... @@ -344,8 +339,8 @@ Elapsed Times for processes csh, sigsuspend 6985124 read 3988049784 - As shown, the read() system call - seems to use the most time in nanoseconds with the + As shown, the read() system call seems + to use the most time in nanoseconds with the getpid() system call used the least amount of time.