From owner-p4-projects@FreeBSD.ORG Sun Oct 19 16:13:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AFFAB1065694; Sun, 19 Oct 2008 16:13:33 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585AF1065686 for ; Sun, 19 Oct 2008 16:13:33 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 461088FC1E for ; Sun, 19 Oct 2008 16:13:33 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9JGDX1C015391 for ; Sun, 19 Oct 2008 16:13:33 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9JGDX0c015389 for perforce@freebsd.org; Sun, 19 Oct 2008 16:13:33 GMT (envelope-from rene@FreeBSD.org) Date: Sun, 19 Oct 2008 16:13:33 GMT Message-Id: <200810191613.m9JGDX0c015389@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Cc: Subject: PERFORCE change 151562 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2008 16:13:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=151562 Change 151562 by rene@rene_self on 2008/10/19 16:13:29 Finish translation of DTrace chapter (rev 1.3). Checked build, spelling, whitespace. Affected files ... .. //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/dtrace/chapter.sgml#3 edit Differences ... ==== //depot/projects/docproj_nl/nl_NL.ISO8859-1/books/handbook/dtrace/chapter.sgml#3 (text+ko) ==== @@ -48,7 +48,7 @@ DTrace, ook bekend als Dynamic Tracing, was ontwikkeld door &sun; als een gereedschap om prestatie-bottlenecks in productie- en preproductiesystemen op te sporen. Het is in geen enkel opzicht - een debug-gereedschap, maar een gereedscahp voor real-time analyse + een debug-gereedschap, maar een gereedschap voor real-time analyse om prestatie- en andere zaken op te sporen. DTrace is een opmerkelijk profileringsgereedschap, met een @@ -57,7 +57,7 @@ scripts te draaien om zo voordeel te halen uit de mogelijkheden. Gebruikers kunnen zelfs hun eigen middelen schrijven door gebruik te maken van de DTrace D Language, wat ze in staat stelt om hun - profiling aan te passen aan hun specifieke behoeften. + profilering aan te passen aan hun specifieke behoeften. Na het lezen van dit hoofdstuk weet u: @@ -115,77 +115,83 @@ - Implementation Differences + Implementatieverschillen - While the DTrace in &os; is very similar to that found - in &solaris;, differences exist that should be explained before - continuing. The primary difference users will notice is that - on &os;, DTrace needs to be specifically enabled. There are - kernel options and modules which must be enabled for DTrace to - work properly. These will be explained later. + Hoewel DTrace in &os; erg lijkt op degene die in &solaris; + zit, zijn er verschillen die uitgelegd moeten worden voordat er + verder wordt gegaan. Het primaire verschil dat gebruikers zullen + zien is dat DTrace specifiek moet worden aangezet op &os;. Er + zijn kernelopties en modulen die aangezet moeten worden om DTrace + juist te laten werken. Deze zullen later worden uitgelegd. - There is a DDB_CTF kernel option which - is used to enable support for loading the 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. - This CTF data is added to the binaries by the - ctfconvert and ctfmerge - build tools. The ctfconvert utility parses - DWARF debug ELF sections - created by the compiler and ctfmerge merges - CTF ELF sections from - objects into either executables or shared libraries. More on - how to enable this for the kernel and &os; build is - forthcoming. + Er is een kerneloptie DDB_CTF die gebruikt + wordt om ondersteuning voor het laden van + CTF-gegevens van kernelmodulen en de kernel + zelf. CTF is het Compact C Type Format van + &solaris; welke een beperkte vorm van debuginformatie bevat + die vergelijkbaar is met DWARF en de befaamde + steken. Deze CTF-gegevens worden door de + bouwmiddelen ctfconvert en + ctfmerge aan de binairen toegevoegd. Het + hulpmiddel ctfconvert parst + DWARF-debug ELF-secties die + door de compiler zijn aangemaakt en ctfmerge + voegt CTF ELF-secties van + objecten samen in hun executables of gedeelde bibliotheken. Meer + informatie over hoe dit voor de bouw van de kernel en &os; aan te + zetten komt eraan. - 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. + Sommige aanbieders voor &os; verschillen van die voor + &solaris;. De meest opmerkelijke is de aanbieder + dtmalloc, welke het volgen van + malloc() op soort in de &os;-kernel + toestaat. - Only root may use DTrace on &os;. - This is related to security differences, &solaris; has a few - low level security checks which do not yet exist in &os;. As - such, the /dev/dtrace/dtrace is strictly - limited to root users only. + Alleen root mag DTrace op &os; gebruiken. + Dit heeft te maken met beveiligingsverschillen, &solaris; heeft + enkele beveiligingscontroles op laag niveau die nog niet bestaan + in &os;. Hierom is /dev/dtrace/dtrace + strikt beperkt tot root. - Finally, the DTrace software falls under &sun;'s - CDDL license. The Common Development - and Distribution License comes with &os;, see the + Tenslotte valt de DTrace-software onder de + CDDL-licentie van &sun;. De Common + Development and Distribution License wordt bij &os; + geleverd, zie /usr/src/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE - or view it online at + of bekijk het online op . - This license means that a &os; kernel with the DTrace options - is still BSD licensed; however the - CDDL kicks in when the modules are distributed - in binary form, or the binaries are loaded. + Deze licentie houdt in dat een &os;-kernel met de + DTrace-opties nog steeds onder de BSD-licentie + valt; de CDDL komt echter op de proppen wanneer + de modulen in binaire vorm worden verspreid, of wanneer de + binairen zijn geladen. - Enabling DTrace Support + Ondersteuning voor DTrace aanzetten - To enable support for DTrace, add the following lines to - the kernel configuration file: + Voeg de volgende regels toe aan het kernelinstellingenbestand + om ondersteuning voor DTrace aan te zetten: options KDTRACE_HOOKS options DDB_CTF - Users of the AMD64 architecture will want to add the - following line to their kernel configuration file: + Gebruikers van de AMD64-architectuur zullen de volgende + regel aan hun kernelinstellingenbestand willen toevoegen: options KDTRACE_FRAME - This option provides support for the FBT - feature. DTrace will work without this option; however, there - will be limited support for function boundary tracing. - + Deze optie biedt ondersteuning voor de mogelijkheid + FBT. DTrace zal zonder deze optie werken; + er zal echter beperkte ondersteuning zijn voor het volgen van + functiegrenzen. + - All sources must be rebuilt and installed with CTF options. - To accomplish this task, rebuild the &os; sources using: + Alle broncode moet herbouwd en geherinstalleerd worden met de + CTF-opties. Om deze taak te volbrengen, wordt + de &os;-broncode herbouwd met: &prompt.root; cd /usr/src &prompt.root; make WITH_CTF=1 buildworld @@ -193,92 +199,95 @@ &prompt.root; make WITH_CFT=1 installworld &prompt.root; mergemaster -Ui - The system will need to be restarted. + Het systeem moet opnieuw gestart worden. - After rebooting and allowing the new kernel to be loaded - into memory, support for the Korn shell should be added. This - is needed as the DTrace toolkit has several utilities written - in ksh. Install the - shells/ksh93. It is also - possible to run these tools under - shells/pdksh or - shells/mksh. + Nadat opnieuw is opgestart en de nieuwe kernel in het geheugen + is geladen, dient ondersteuning voor de Korn-shell te worden + toegevoegd. Dit is nodig omdat de verschillende hulpmiddelen van + DTrace in ksh zijn geschreven. Installeer + shells/ksh93. Het is ook + mogelijk om deze hulpmiddelen in shells/pdksh of shells/mksh te draaien. - Finally, obtain the current DTrace toolkit. The current - version is available at + Als laatste dient de huidige DTrace-gereedschapskist verkregen + te worden. De huidige versie is beschikbaar op . - There is an install mechanism included; however, installation - is not required to make use of the bundled utilities. + Het bevat een installatiemechanisme; om gebruik te maken van de + bijgeleverde hulpmiddelen is installatie echter niet nodig. - Using DTrace + DTrace gebruiken - Before making use of DTrace functionality, the DTrace device - must exist. To load the device, issue the following - command: + Voordat er gebruik wordt gemaakt van de functionaliteit van + DTrace, moet het DTrace-apparaat bestaan. Geef het volgende + commando om het apparaat te laten: &prompt.root; kldload dtraceall - DTrace support should now be available. To view all probes - the administrator may now execute the following command: + Ondersteuning van DTrace zou nu beschikbaar moeten zijn. De + beheerder kan het volgende commando uitvoeren om alle sondes te + bekijken: &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. + Alle uitvoer wordt aan het hulpmiddel more + doorgegeven omdat het snel de schermbuffer zal laten overstromen. + DTrace kan nu als werkend worden beschouwd. Het is nu tijd om de + gereedschapskist te bekijken. - 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 - a lot more. Extract the scripts with the following - command: + De gereedschapskist is een verzameling van kant-en-klare + scripts die met DTrace gedraaid kunnen worden om informatie over + het systeem te verzamelen. Er zijn scripts om open bestanden, + geheugen, CPU-gebruik, en nog veel meer te + controleren. Pak de scripts uit met het volgende commando: &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. + Ga naar die map met cd en zet de + uitvoerpermissies voor alle bestanden waarvan de naam uit kleine + letters bestaat, op 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. + De inhoud van al deze scripts moet veranderd worden. Degenen + die naar /usr/bin/ksh verwijzen dienen naar + /usr/local/bin/ksh te verwijzen, de anderen + die /usr/bin/sh gebruiken dienen gewijzigd te + worden om /bin/sh te gebruiken, en tenslotte + dienen degenen die /usr/bin/perl gebruiken + veranderd te worden om /usr/local/bin/perl te + gebruiken. - At this point it is prudent to remind the reader that - DTrace support in &os; is incomplete - and experimental. Many of these scripts - will not work as they are either too &solaris;-specific or - use probes which are unsupported at this time. + Op dit moment is het voorzichtig om de lezer eraan te + herinneren dat de ondersteuning voor DTrace in &os; + niet compleet en + experimenteel is. Veel van deze scripts + zullen niet werken omdat ze of te &solaris;-specifiek zijn of + omdat ze sondes gebruiken die momenteel niet ondersteund + worden. - 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 - we will explore in the following parts of this section. + Op het moment van schrijven worden slechts twee scripts van de + DTrace Toolkit volledig ondersteund in &os;: de scripts + hotkernel en + procsystime. Dit zijn de twee die we in de + volgende gedeelten van deze sectie zullen bekijken. - The hotkernel is designed to identify - which function is using the most kernel time. Run normally, it - will produce output similar to the following: + De hotkernel is ontworpen om te + identificeren welke functie de meeste kerneltijd gebruikt. Als + het normaal gedraaid wordt, zal het uitvoer die op de volgende + lijkt produceren: &prompt.root; ./hotkernel Sampling... Hit Ctrl-C to end. - The system administrator must use the - CtrlC - key combination to stop the process. Upon - termination, the script will display a list of kernel functions and - timing information, sorting the output in increasing order of - time: + De systeembeheerder moet de toetsencombinatie CtrlC + gebruiken om het proces te stoppen. Nadat het gestopt is, zal het + script een lijst van kernelfuncties en timinginformatie weergeven, + waarbij de uitvoer in volgorde van toenemende tijd is + gesorteerd: kernel`_thread_lock_flags 2 0.0% 0xc1097063 2 0.0% @@ -311,8 +320,9 @@ to find 0xc10981a5, but to no avail. It would be nice to know how we should look that up. --> - This script will also work with kernel modules. To use this - feature, run the script with the flag: + Het script werkt ook met kernelmodules. Draai het script met + de vlag om deze mogelijkheid te + gebruiken: &prompt.root; ./hotkernel -m Sampling... Hit Ctrl-C to end. @@ -335,14 +345,14 @@ kldstat and kldstat -v and grep. Maybe I'm missing something seriously obvious. It is 5AM btw. --> - 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: + Het script procsystime vangt en beeldt + het tijdsgebruik van systeemaanroepen af voor een gegeven + PID of procesnaam. In het volgende voorbeeld + wordt er een nieuwe instantie van /bin/csh + gedraaid. Het procsystime werd uitgevoerd en + bleef wachten terwijl er enkele commando's op de andere instantie + van csh werden getypt. Dit zijn de resultaten + van deze test: &prompt.root; ./procsystime -n csh Tracing... Hit Ctrl-C to end... @@ -370,20 +380,21 @@ sigsuspend 6985124 read 3988049784 - 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. + Zoals te zien is, lijkt de systeemaanroep + read() de meeste tijd in nanoseconden te + gebruiken en gebruikte de systeemaanroep + getpid() de minste hoeveelheid tijd. - The D Language + De taal D - 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 . + De DTrace-gereedschapskist bevat vele scripts in de speciale + taal van DTrace. Deze taal wordt de taal D genoemd + door de documentatie van &sun;, en lijkt sterk op C++. Een + diepgaande discussie over de taal valt buiten het bereik van dit + document. Het wordt uitgebreid behandeld op + .