diff options
Diffstat (limited to 'cddl/contrib/dtracetoolkit/Docs')
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/Contents | 152 | ||||
l--------- | cddl/contrib/dtracetoolkit/Docs/Examples | 1 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/Faq | 126 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/History | 249 | ||||
l--------- | cddl/contrib/dtracetoolkit/Docs/Index | 1 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/Links | 30 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/Maintainer | 6 | ||||
l--------- | cddl/contrib/dtracetoolkit/Docs/Notes | 1 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/Readme | 21 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/ToDo | 7 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/Who | 74 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/cddl1.txt | 385 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Docs/oneliners.txt | 81 |
13 files changed, 1134 insertions, 0 deletions
diff --git a/cddl/contrib/dtracetoolkit/Docs/Contents b/cddl/contrib/dtracetoolkit/Docs/Contents new file mode 100644 index 0000000..525fd05 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Contents @@ -0,0 +1,152 @@ +Contents - Command Summary + + The following is a list of commands found in the DTraceToolkit, along + with their directory location. + +Generally commands that end in a ".d" are DTrace scripts, and commands +that don't are DTrace scripts wrapped in another language (eg, shell +or Perl). See the Docs/Readme for instructions for finding their docs. + +DTraceToolkit/ + dexplorer run a series of scripts and archive output + dtruss process syscall info. DTrace truss + dvmstat vmstat by PID/name/command + errinfo report syscall failures with details + execsnoop snoop process execution as it occurs + iosnoop snoop I/O events as they occur + iopattern print disk I/O pattern + iotop display top disk I/O events by process + opensnoop snoop file opens as they occur + procsystime analyse process system call times + rwsnoop snoop read/write events + rwtop display top read/write bytes by process + statsnoop snoop file stats as they occur + Apps/ + httpdstat.d realtime httpd statistics + nfswizard.d NFS client activity wizard + shellsnoop snoop live shell activity + weblatency.d website latency statistics + Cpu/ + cputypes.d list CPU types + cpuwalk.d measure which CPUs a process runs on + dispqlen.d dispatcher queue length by CPU + intbycpu.d interrupts by CPU + intoncpu.d interrput on-cpu usage + inttimes.d interrput on-cpu time total + loads.d print load averages + runocc.d run queue occupancy by CPU + xcallsbypid.d CPU cross calls by PID + Disk/ + bitesize.d print disk event size report + diskhits disk access by file offset + hotspot.d print disk event by location + iofile.d I/O wait time by filename and process + iofileb.d I/O bytes by filename and process + iopending plot number of pending disk events + pathopens.d pathnames successfully opened count + seeksize.d print disk seek size report + Docs/ + oneliners.txt DTrace oneliners + FS/ + fsrw.d file system read/write event tracing + fspaging.d file system read/write and paging tracing + rfsio.d read FS I/O stats, with cache miss rate + rfileio.d read file I/O stats, with cache miss rate + vopstat vnode interface statistics + Java/ + j_*.d 18 scripts for tracing Java using the hotspot provider + JavaScript/ + js_*.d 14 scripts for JavaScript with the Mozilla provider + Kernel/ + cputimes print time by Kernel/Idle/Process + cpudists time distribution by Kernel/Idle/Process + cswstat.d context switch time statistics + dnlcps.d DNLC stats by process + dnlcsnoop.d snoop DNLC activity + dnlcstat DNLC statistics + kstat_types.d trace kstat reads with type info + modcalls.d kernel function calls by module name + priclass.d priority distribution by scheduling class + pridist.d process priority distribution + putnexts.d trace who is putting to which streams module + whatexec.d examine the type of files executed + Locks/ + lockbyproc.d lock time by process name + lockbydist.d lock time distribution by process name + Mem/ + anonpgpid.d anonymous memory paging info by PID on CPU + minfbypid.d minor faults by PID + minfbyproc.d minor faults by process name + pgpginbypid.d pages paged in by PID + pgpginbyproc.d pages paged in by process name + swapinfo.d print virtual memory info + vmbypid.d virtual memory stats by PID + vmstat.d vmstat demo using DTrace + vmstat-p.d vmstat -p demo using DTrace + xvmstat extended vmstat demo using DTrace + Misc/ + guess.d guessing game + wpm.d words per minute tracing + woof.d audio alert for new processes + Net/ + connections print inbound TCP connections by process + icmpstat.d print ICMP statistics + tcpsnoop snoop TCP network packets by process, Solaris 10 3/05 + tcpsnoop_snv snoop TCP network packets by process, Solaris Nevada + tcpsnoop.d snoop TCP network packets by process, Solaris 10 3/05 + tcpsnoop_snv.d snoop TCP network packets by process, Solaris Nevada + tcpstat.d print TCP statistics + tcptop display top TCP network packets by PID, Solaris 10 3/05 + tcptop_snv display top TCP network packets by PID, Solaris Nevada + tcpwdist.d simple TCP write distribution by process + udpstat.d print UDP statistics + Perl/ + pl_*.d 12 scripts for tracing Perl + Php/ + php_*.d 12 scripts for tracing Php + Proc/ + crash.d crashed application report + creatbyproc.d snoop file creat() by process name + dappprof profile user and lib function usage + dapptrace trace user and lib function usage + fddist file descriptor usage distribution + fileproc.d snoop files opened by process + kill.d snoop process signals + lastwords print syscalls before exit + mmapfiles.d mmap'd files by process + newproc.d snoop new processes + pfilestat show I/O latency break down by FD + pidpersec.d print new PIDs per sec + readbytes.d read bytes by process name + readdist.d read distribution by process name + rwbbypid.d read/write bytes by PID + rwbypid.d read/write calls by PID + rwbytype.d read/write bytes by vnode type + sampleproc sample processes on the CPUs + shortlived.d check short lived process time + sigdist.d signal distribution by process name + stacksize.d measure stack size for running threads + sysbypid.d system stats by PID + syscallbyproc.d system calls by process name + syscallbypid.d system calls by process ID + threaded.d sample multi-threaded CPU usage + topsysproc display top syscalls by process name + writebytes.d write bytes by process name + writedist.d write distribution by process name + Python/ + py_*.d 14 scripts for tracing Python + Shell/ + sh_*.d 15 scripts for tracing the Bourne shell + System/ + sar-c.d sar -c demo using DTrace + syscallbysysc.d system calls by system call + topsyscall display top system call type + uname-a.d uname -a demo using DTrace + Tcl/ + tcl_*.d 15 scripts for tracing Tcl + User/ + setuids.d snoop setuid calls + Zones/ + zvmstat vmstat info by zone + +Total: 230 scripts diff --git a/cddl/contrib/dtracetoolkit/Docs/Examples b/cddl/contrib/dtracetoolkit/Docs/Examples new file mode 120000 index 0000000..3098326 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Examples @@ -0,0 +1 @@ +../Examples
\ No newline at end of file diff --git a/cddl/contrib/dtracetoolkit/Docs/Faq b/cddl/contrib/dtracetoolkit/Docs/Faq new file mode 100644 index 0000000..4919cac --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Faq @@ -0,0 +1,126 @@ +Faq - Frequently Asked Questions + + The following may serve as a guide to the DTraceToolkit. + +16-May-2005, ver 0.30 (first version of the FAQ) + +The DTraceToolkit is new, and as such there hasn't been many questions asked. +This may be better called a "possibly asked questions" :) + + +Questions + +1. Intro +1.1. What is the DTraceToolkit? +1.2. Who wrote the DTraceToolkit? +1.3. Where do I get support? +1.4. Am I now a performance tuning expert? +1.5. Will this solve all my performance problems? +1.6. So the DTraceToolkit *is* DTrace? + +2. Toolkit +2.1. What is in it? +2.2. What performance effect can the DTraceToolkit cause? + +3. Contributing +3.1. Where do I send bugs? + + +Answers + +1. Intro + +1.1. What is the DTraceToolkit? + + The DTraceToolkit is a collection of tools written using DTrace for + the Solaris 10[tm] OS by Sun Microsystems[tm]. Many of these scripts + will also work on OpenSolaris. + +1.2. Who wrote the DTraceToolkit? + + Volunteers of the DTrace and OpenSolaris community. Check the scripts + themselves, Docs/Contrib, Docs/Who and Docs/History. + +1.3. Where do I get support? + + As the DTraceToolkit is a freeware product, there is no official company + offering support for this. Sun Microsystems does not support this. If you + post messages to the DTrace forums found in the Docs/Links file, a + volunteer may help you out. + +1.4. Am I now a performance tuning expert? + + The DTraceToolkit does not turn people into performance tuning experts in + the same way that owning a set of golf clubs won't make you a professional + golfer. Experience and understanding are necessary. The toolkit certainly + helps by fetching the data in an easy way, and also by providing some + documentation. So it is valuable, but not magical. + +1.5. Will this solve all my performance problems? + + This is similar to the previous point; the DTraceToolkit is valuable + for it's scripts and documentation, but it's no magical product. + Understanding and experience are necessary. + +1.6. So the DTraceToolkit *is* DTrace? + + The DTraceToolkit is one use of DTrace, but there is far more to DTrace + than just the toolkit. DTrace allows people to write their own customised + scripts to solve a wide number of problems. + + Think of the DTraceToolkit as a starting point. Maybe your problem has + a solution in the kit. Maybe changing one of the toolkit programs slightly + is what you want. Finally you may need to write your script from scratch. + + +2. Toolkit + +2.1. What is in it? + + Read the Guide file for a table of contents, and Docs/Contents for a + list of commands. + +2.2. What performance effect can the DTraceToolkit cause? + + Enabling DTrace to monitor events has little effect on the system, + especially when compared to the disruptive behaviour of truss (See + http://www.brendangregg.com/DTrace/dtracevstruss.html for a comparison). + + It really boils down to how often the events occur that you are monitoring. + The following numbers have been provided as an approximation: + + 1. Fixed rate scripts. For example, dispqlen.d samples at 1000 hz. + The impact will be negligible, close to 0% CPU. (in testing, 0.1% CPU). + + 2. Demand rated scripts. For example, iosnoop probes disk I/O events. + The impact depends on the rate of events, for many servers the disk + events would be slow enough for this to be less than 0.2% CPU. + Scripts such as execsnoop would expect even fewer events, their impact + would be close to 0.0% CPU. However scripts that monitor potentially + very rapid events will have a greater impact, for example running + dapptrace on Xorg (over 6000 lines of output per second) was consuming + around 10% of a CPU to do so. + + 3. Heavy voodoo scripts. A few scripts in the toolkit must probe either + a ton of different events, or very rapid events, or both. They are + going to hurt and there is no way around it. Scripts such as cputimes + and cpudists trace very frequent events, and can chew around 5% of + the CPUs; scripts such as dapptrace and dappprof trace extreamly + frequent events, and can chew over 20%. + + There is an emphasis in the DTraceToolkit to write demand rated scripts + that measure the fewest events, such that their impact is close to 0.0% + CPU usage. Some scripts are fixed rate, which are safer as their impact + has a known upper bound, and are most suitable to run in production. + + There are additional notes in Notes/ALLoverhead_notes.txt about the + overheads for running DTrace. + + +3. Contributing + +3.1. Where do I send bugs? + + The DTraceToolkit maintainer. See the Docs/Maintainer file. + + diff --git a/cddl/contrib/dtracetoolkit/Docs/History b/cddl/contrib/dtracetoolkit/Docs/History new file mode 100644 index 0000000..d92bf11 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/History @@ -0,0 +1,249 @@ +History - History of the DTraceToolkit + +------------------------------------------------------------------------------ +20-Apr-2005 Brendan Gregg Idea + For a while I had thought that a DTrace toolkit would be a nice + idea, but on this day it became clear. I was explaining DTrace to + an SSE from Sun (Canberra, Australia), who had a need for using + DTrace but didn't have the time to sit down and write all the + tools he was after. It simply made sense to have a DTrace toolkit + that people could download or carry around a copy to use. Some + people would write DTrace tools, others would use the toolkit. +------------------------------------------------------------------------------ +15-May-2005 Brendan Gregg Version 0.30 + I had discussed the idea of a DTrace toolkit with the Sun PAE guys in + Adelaide, Australia. It was making more sense now. It would be much + like the SE Toolkit, not just due to the large number of sample + scripts provided, but also due to the role it would play: few people + wrote SE Toolkit programs, more people used it as a toolkit. While + we would like a majority of Solaris users to write DTrace scripts, + the reality is that many would want to use a prewritten toolkit. + Today I created the toolkit as version 0.30, with 11 main directories, + a dozen scripts, man pages and a structure for documentation. +------------------------------------------------------------------------------ +16-May-2005 Brendan Gregg OneLiners + I've been using the toolkit for a day now (wow!), and have noticed + a few problems I've been fixing. One of them was the dtrace oneliners. + I have them in two files, Docs/oneliners.txt and the examples in + Docs/Examples/oneliners_examples.txt. The problem is that when I'm + looking for a script, I'm looking in Docs/Commands - a list of the + seperate script files, or I'm doing an ls or find. Ok, so I've now + made each one liner a seperate script. This seems at first pretty + silly since they are oneliners and shouldn't deserve an entire script + each, but I've found having them as seperate scripts makes them far + easier to find and use. The scripts and man page for each script do + point out the fact that it's a one liner. +------------------------------------------------------------------------------ +17-May-2005 Brendan Gregg Version 0.33 + Version 0.33 with 33 scripts. Maybe I should make the version number + equal the script count. :) I just finished dtruss, dapptrace and + dappprof. +------------------------------------------------------------------------------ +08-Jun-2005 Brendan Gregg Name changes. + I've renamed Docs/Commands to Docs/Contents. I found myself typing + "more Docs/Contents" by mistake a lot. ok, maybe it made more sense + to call it Contents after all. I've also made a symlink to it called + Index. +------------------------------------------------------------------------------ +08-Jun-2005 Brendan Gregg Version 0.35 + Version 0.35 with 35 scripts. Also touched up procsystime and some + man pages. Added the CDDL version 1.0. +------------------------------------------------------------------------------ +09-Jun-2005 Brendan Gregg Version 0.42 + Added 7 more scripts. +------------------------------------------------------------------------------ +14-Jun-2005 Brendan Gregg Version 0.57 + Added heaps of new scripts. Now at 57 scripts. +------------------------------------------------------------------------------ +17-Jun-2005 Brendan Gregg Version 0.61 + Restyled many commands. +------------------------------------------------------------------------------ +28-Jun-2005 Brendan Gregg Version 0.70 + Added several commands including dexplorer. Developed a few useful + variants of classic scripts while writing dexplorer, and have added + them to the toolkit (I kept wanting to run them individually but + not have to run an entire dexplorer). +------------------------------------------------------------------------------ +25-Jul-2005 Brendan Gregg Version 0.77 + Added tcpsnoop.d, tcpsnoop, tcptop. Because of their addition I have + dropped tcpwbytes.d and tcpwlist. These are complex scripts, but they + track TCP in an accurate manner. However! also because they are + complex scripts, I expect they will require maintainence for newer + versions of [Open]Solaris, as various probes may change. They will + become much more stable once a network provider has been added to + DTrace (which may be some time away). + Also added iotop, and updated a bunch of scripts. A lot of work went + into this version, although the version change doesn't reflect that + (I'm still keeping the version number == to number of scripts). + Also added rwsnoop, rwtop, and more. +------------------------------------------------------------------------------ +26-Jul-2005 Brendan Gregg Version 0.82 + Many new scripts added, many updates. This is a major release. +------------------------------------------------------------------------------ +17-Sep-2005 Brendan Gregg Version 0.83 + A few scripts have been updated so that they work better. + execsnoop, iosnoop, opensnoop and rwsnoop will be more responsive + (increased switchrate). +------------------------------------------------------------------------------ +22-Sep-2005 Brendan Gregg Version 0.84 + Some updates, fixed some bugs (cputimes, cpudists). Added cpuwalk.d. +------------------------------------------------------------------------------ +15-Nov-2005 Brendan Gregg Sys Admin Magazine + Ryan Matteson wrote an article on the DTraceToolkit which has been + printed in Sys Admin Magazine, December 2005. It's quite good, + and made it as the feature article - which means it will be available + online for some time. Thanks Matty, and Sys Admin Magazine! + "Observing I/O Behavior with the DTraceToolkit" + http://www.samag.com/documents/sam0512a/ +------------------------------------------------------------------------------ +01-Dec-2005 Brendan Gregg Version 0.88 + Many scripts were updated. Added the Apps category. I had planned + to add some key scripts, but they haven't made it out of testing yet. +------------------------------------------------------------------------------ +03-Dec-2005 Brendan Gregg Version 0.89 + Added nfswisard.d, fixed a minor bug with tcp* tools (see + dtrace-discuss mailing list). +------------------------------------------------------------------------------ +12-Jan-2006 Brendan Gregg Version 0.92 + Added a few scripts including rwbytype.d. Fixed several issues. +------------------------------------------------------------------------------ +09-Apr-2006 Brendan Gregg Solaris Internals 2nd Edition + In the past few months I have been contributing to Solaris Internals + 2nd Edition. This book (now two volumes) is really amazing. The 2nd + volume does use the DTraceToolkit where appropriate, and covers loads + of useful topics. While writing and reviewing material for Solaris + Internals, I've had numerous new ideas for DTrace scripts. Not only + that, but a few people have managed to send me well styled, carefully + tested, well considered DTrace scripts for inclusion in the toolkit. +------------------------------------------------------------------------------ +20-Apr-2006 Brendan Gregg TCP bug fixed + Stefan Parvu sent me a bug for the tcp* scripts: on build 31+ they + error'd on the symbol SS_TCP_FAST_ACCEPT. This symbol was + renamed to SS_DIRECT (I checked the code, they are used in the + same way). Ironically, when I first wrote the scripts I had hardcoded + the value 0x00200000, then rewrote it "properly" by importing + the header files and using the symbol name. Had I been lazy and left + it hardcoded, the bug would never have eventuated. Not to worry, + it has returned to being hardcoded, so that it works on all builds + (until something else changes). +------------------------------------------------------------------------------ +21-Apr-2006 Brendan Gregg Restyled - again! + I've been writing the "DTraceToolkit Style Guide", to document + the style that these scripts obey. It is quite strict, and sets + the bar fairly high. I've been warned that it may cause very few + people to ever contribute scripts, which is fine. At some point + I'll carefully explain the mentality behind this, but in a nutshell: + Users on critical production servers expect the tools to be + accurate, carefully tested, and cause no undocumented harm. +------------------------------------------------------------------------------ +22-Apr-2006 Brendan Gregg Docs changes + The "Contrib" file was merged into the "Who" file. In hindsight + it is better to keep this data together than to split it up. +------------------------------------------------------------------------------ +24-Apr-2006 Brendan Gregg Version 0.96 + The toolkit now contains 104 scripts, however I'll keep the version + number < 1.00 until the dust has settled on these new scripts. + There is some special significance with version 1.00, it would + imply that every script had been tested for some time - not that + I've just added a few. + There is a new main directory, FS for file system related scripts. + There are some interesting scripts in there, from or based on + Solaris Internals 2nd ed, vol 2. +------------------------------------------------------------------------------ +30-Sep-2007 Brendan Gregg Version 0.99 + It's been a year and a half since the last release, and a lot has + happneed. Firstly, the DTraceToolkit has featured in the Prentice Hall + book, + Solaris Performance and Tools + DTrace and mdb techniques for Solaris 10 and OpenSolaris + + written by Richard McDougall, Jim Mauro and myself. It is a companion + book to "Solaris Internals 2nd edition" by Richard McDougall and + Jim Mauro. If you are serious about becomming a DTrace guru, + especially on Solaris, then please study both books. (Yes, I realize + that many people are using the DTraceToolkit because they don't have + the time or don't want to become DTrace gurus; well, so long as + you are using DTrace anyway :). The performance book was a great relief + to write - since we were able to put to print much performance wisdom + and knowledge that was begging to be documented. + + Then, in late 2006 I joined an advanced products engineering team + at Sun in San Francisco, a team which includes the three members of + team DTrace. It's been a great opportunity to learn from such + engineers, and to contribute more directly to DTrace. So far my work + has included writing a JavaScript provider, integrated inet_ntoa() + style functions into DTrace, and prototying DTrace IP, TCP and UDP + providers. + + Working on the network providers is good news for the DTraceToolkit, + as it will indirectly help the tcp* scripts become more stable. Yes, + those scripts have broken a few more times during the last 18 months, + sorry about that, and it will keep happening until we have stable + network providers. This is why I only ever wrote three tcp* scripts, + and not at least a dozen, which I'd really like to do. + + I did leave my pile of old SPARC and x86 development servers behind + in Australia, and brought over a couple of laptops. That has made me + more dependant on Stefan for testing the toolkit - especially on SPARC. + + So, it's been about 18 months since the last release, which is + mostly due to having less spare time due to moving countries and + learning a new job. + + Michelle from Sun docs has been asking for a newer version of the + DTraceToolkit for the OpenSolaris starter kit, which is why I'm + releasing this version now and not waiting a few more weeks as + I complete bug fixes. + + So the good and the bad news for this release, starting with the bad, + + Bad: tcpsnoop/tcptop still don't work on some Solaris 10 releases. + I've added versions that should work on Solaris Nevada and OpenSolaris + for releases from around late 2007. They are likely to break again. + The real answer, as always, is for stable nework providers to be + integrated into Solaris. + + Many of the exciting new language provider scripts in this release + currently require downloading, patching and compling of the language + interpreter to get working. See the Readme file in each directory + for pointers. + + Good: many more scripts to cover the new DTrace language providers + that are available (the DTraceToolkit is now 227 scripts). Many + updates to the Notes directory. Bug fixes. Some new categories + other than for scripts: Code - for simple programs to DTrace (and + for the example files), and Snippits - for useful lumps of DTrace + code to copy-n-paste from. The man pages are also making room + for documenting both stability and supported operating systems for + each script - now that DTrace exists for MacOS X Leopard, the + DTraceToolkit will begin supporting multiple operating systems. + + This can be thought of as a developer's release of the DTraceToolkit - + to help people start using DTrace with Perl, Python, Ruby, Php, Java, + JavaScript, Shell and Tcl. I've written about 15 scripts for each + language, to cover the basics and to show the way for deeper analysis. + The scripts are also similar from one language to another, having + devoleped a tried-and-tested group of scripts for analyzing real world + issues - it made sense to repeat these scripts for every language + possible. To see what I mean, try reading, + + Examples/j_cputime_example.txt Examples/py_cputime_example.txt + Examples/js_cputime_example.txt Examples/rb_cputime_example.txt + Examples/php_cputime_example.txt Examples/sh_cputime_example.txt + Examples/pl_cputime_example.txt Examples/tcl_cputime_example.txt + + You might notice that the example files are more clearly and carefully + explained. Claire (my wife), wrote close to one hundred of them for + this release while I focused on writing and testing the scripts. + Claire has worked as a SysAdmin and as an IT instructor, and is well + skilled at explaining relavent technical details. And she can spell + much better than I can. :) + + The future: I still have many new scripts and some bug fixes in mind, + as well as generally improving the Notes and Examples provided. + Hopefully it won't be too many months before you see another + release. Check here for the lastest installment, + + http://www.opensolaris.org/os/community/dtrace/dtracetoolkit +------------------------------------------------------------------------------ + diff --git a/cddl/contrib/dtracetoolkit/Docs/Index b/cddl/contrib/dtracetoolkit/Docs/Index new file mode 120000 index 0000000..9ae9ea0 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Index @@ -0,0 +1 @@ +Contents
\ No newline at end of file diff --git a/cddl/contrib/dtracetoolkit/Docs/Links b/cddl/contrib/dtracetoolkit/Docs/Links new file mode 100644 index 0000000..182bb54 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Links @@ -0,0 +1,30 @@ +Links - DTrace links + + http://www.opensolaris.org/os/community/dtrace/dtracetoolkit + DTraceToolkit Home + + http://www.opensolaris.org/os/community/dtrace + OpenSolaris DTrace site + + http://www.brendangregg.com/dtrace.html + DTraceToolkit + DTrace Tools + + http://www.sun.com/bigadmin/content/dtrace + DTrace site on BigAdmin + + http://docs.sun.com/db/doc/817-6223 + DTrace Guide (answerbook) + + http://blogs.sun.com/roller/page/bmc + Bryan Cantrill's Blog (DTrace Team) + + http://blogs.sun.com/roller/page/ahl + Adam Leventhal's Blog (DTrace Team) + + http://blogs.sun.com/mws + Mike Shapiro's Blog (DTrace Team) + + http://www.solarisinternals.com/si/dtrace/index.php + DTrace scripts by Richard McDougall + diff --git a/cddl/contrib/dtracetoolkit/Docs/Maintainer b/cddl/contrib/dtracetoolkit/Docs/Maintainer new file mode 100644 index 0000000..3a8bb42 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Maintainer @@ -0,0 +1,6 @@ +Maintainer - The DTraceToolkit Author and Maintainer, + + Brendan Gregg + brendan@sun.com (or see website below for emailaddr) + http://www.brendangregg.com + diff --git a/cddl/contrib/dtracetoolkit/Docs/Notes b/cddl/contrib/dtracetoolkit/Docs/Notes new file mode 120000 index 0000000..e0856fe --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Notes @@ -0,0 +1 @@ +../Notes
\ No newline at end of file diff --git a/cddl/contrib/dtracetoolkit/Docs/Readme b/cddl/contrib/dtracetoolkit/Docs/Readme new file mode 100644 index 0000000..1f98f38 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Readme @@ -0,0 +1,21 @@ +Docs - DTraceToolkit Documentation + + Docs/Contents summary of toolkit commands + Examples examples of command usage + Notes notes on commands + +The following may be followed to learn about a DTraceToolkit command, + + 1. read "Contents" for a command name and toolkit location. + 2. run the command with "-h" to check it's usage. + 3. read the manpage from Man/man1m. + 4. read the examples from Examples. + 5. read the notes from Notes. + 6. read the script itself + +Try the following to discover all docs related to a command, eg iosnoop, + + find . | grep iosnoop + +best run from the DTraceToolkit root directory. + diff --git a/cddl/contrib/dtracetoolkit/Docs/ToDo b/cddl/contrib/dtracetoolkit/Docs/ToDo new file mode 100644 index 0000000..5561ea4 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/ToDo @@ -0,0 +1,7 @@ +ToDo - To Do List + + The following is a list of todo reminders for the DTraceToolkit. + +* Run PHP examples on mediawiki. + + diff --git a/cddl/contrib/dtracetoolkit/Docs/Who b/cddl/contrib/dtracetoolkit/Docs/Who new file mode 100644 index 0000000..f1019a9 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/Who @@ -0,0 +1,74 @@ +Who - Who the Contributers are + + This is a record of contributors to the DTraceToolkit whose name isn't + already mentioned (such as in the source of a script). + + +In alphabetical first-name order, + +Adam Leventhal + Location: CA, USA + Blog: http://blogs.sun.com/ahl + wrote DTrace itself + +Ben Rockwood + Location: CA, USA + Website: http://www.cuddletech.com + first encouraged the idea of DTrace oneliners + +Brendan Gregg + Location: Sydney, Australia + Website: http://www.brendangregg.com + Email: brendan.gregg@tpg.com.au (maybe, check the website above) + Blog: http://bdgregg.blogspot.com + Notes: Also see http://www.brendangregg.com/dtrace.html + created toolkit, tools, manpages, example docs, notes docs, testing + +Bryan Cantrill + Location: CA, USA + Blog: http://blogs.sun.com/bmc + wrote DTrace itself + +David Rubio + technical advice + +James Dickens + Location: WI, USA + Blog: http://uadmin.blogspot.com + tool ideas and testing + +Jonathan Adams + Blog: http://blogs.sun.com/jwadams + wrote stacksize.d + +Mike Shapiro + Location: CA, USA + Blog: http://blogs.sun.com/mws + wrote DTrace itself + +Nathan Kroenert + Location: Sydney, Australia + thoughts on how to present tools + +Richard McDougall + Location: CA, USA + Website: http://www.solarisinternals.com + Blog: http://blogs.sun.com/rmc + wrote pfilestat, vopstat + +Ryan Matteson + Location: USA + Blog: http://blogomatty.blogspot.com + tool ideas and testing + +Stefan Parvu + Blog: http://stefanparvu.blogspot.com + suggestions, bug fixes, extensive testing + +unknown Sun people + wrote /usr/demo/dtrace tools, which some of the toolkit tools are + based on. See "BASED ON" in source or man page, or try the following, + cd Bin + grep 'BASED ON' * + for a list. + diff --git a/cddl/contrib/dtracetoolkit/Docs/cddl1.txt b/cddl/contrib/dtracetoolkit/Docs/cddl1.txt new file mode 100644 index 0000000..b3487ad --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/cddl1.txt @@ -0,0 +1,385 @@ + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + + + 1. Definitions. + + 1.1. ÒContributorÓ means each individual or entity that + creates or contributes to the creation of Modifications. + + 1.2. ÒContributor VersionÓ means the combination of the + Original Software, prior Modifications used by a + Contributor (if any), and the Modifications made by that + particular Contributor. + + 1.3. ÒCovered SoftwareÓ means (a) the Original Software, or + (b) Modifications, or (c) the combination of files + containing Original Software with files containing + Modifications, in each case including portions thereof. + + 1.4. ÒExecutableÓ means the Covered Software in any form + other than Source Code. + + 1.5. ÒInitial DeveloperÓ means the individual or entity + that first makes Original Software available under this + License. + + 1.6. ÒLarger WorkÓ means a work which combines Covered + Software or portions thereof with code not governed by the + terms of this License. + + 1.7. ÒLicenseÓ means this document. + + 1.8. ÒLicensableÓ means having the right to grant, to the + maximum extent possible, whether at the time of the initial + grant or subsequently acquired, any and all of the rights + conveyed herein. + + 1.9. ÒModificationsÓ means the Source Code and Executable + form of any of the following: + + A. Any file that results from an addition to, + deletion from or modification of the contents of a + file containing Original Software or previous + Modifications; + + B. Any new file that contains any part of the + Original Software or previous Modification; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. ÒOriginal SoftwareÓ means the Source Code and + Executable form of computer software code that is + originally released under this License. + + 1.11. ÒPatent ClaimsÓ means any patent claim(s), now owned + or hereafter acquired, including without limitation, + method, process, and apparatus claims, in any patent + Licensable by grantor. + + 1.12. ÒSource CodeÓ means (a) the common form of computer + software code in which modifications are made and (b) + associated documentation included in or with such code. + + 1.13. ÒYouÓ (or ÒYourÓ) means an individual or a legal + entity exercising rights under, and complying with all of + the terms of, this License. For legal entities, ÒYouÓ + includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this + definition, ÒcontrolÓ means (a) the power, direct or + indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership + of more than fifty percent (50%) of the outstanding shares + or beneficial ownership of such entity. + + 2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the + Initial Developer hereby grants You a world-wide, + royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Initial Developer, + to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, + using or selling of Original Software, to make, have + made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or + portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) + are effective on the date Initial Developer first + distributes or otherwise makes the Original Software + available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent + license is granted: (1) for code that You delete from + the Original Software, or (2) for infringements + caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original + Software with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Contributor to + use, reproduce, modify, display, perform, sublicense + and distribute the Modifications created by such + Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + + + (b) under Patent Claims infringed by the making, + using, or selling of Modifications made by that + Contributor either alone and/or in combination with + its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, + have made, and/or otherwise dispose of: (1) + Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications + made by that Contributor with its Contributor Version + (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and + 2.2(b) are effective on the date Contributor first + distributes or otherwise makes the Modifications + available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent + license is granted: (1) for any code that Contributor + has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the + combination of Modifications made by that Contributor + with other software (except as part of the + Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the + absence of Modifications made by that Contributor. + + 3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in + Source Code form and that Source Code form must be + distributed only under the terms of this License. You must + include a copy of this License with every copy of the + Source Code form of the Covered Software You distribute or + otherwise make available. You must inform recipients of any + such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used + for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You + contribute are governed by the terms of this License. You + represent that You believe Your Modifications are Your + original creation(s) and/or You have sufficient rights to + grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications + that identifies You as the Contributor of the Modification. + You may not remove or alter any copyright, patent or + trademark notices contained within the Covered Software, or + any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered + Software in Source Code form that alters or restricts the + applicable version of this License or the recipientsÕ + rights hereunder. You may choose to offer, and to charge a + fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You + must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by + You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered + Software under the terms of this License or under the terms + of a license of Your choice, which may contain terms + different from this License, provided that You are in + compliance with the terms of this License and that the + license for the Executable form does not attempt to limit + or alter the recipientÕs rights in the Source Code form + from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a + different license, You must make it absolutely clear that + any terms which differ from this License are offered by You + alone, not by the Initial Developer or Contributor. You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms + You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software + with other code not governed by the terms of this License + and distribute the Larger Work as a single product. In such + a case, You must make sure the requirements of this License + are fulfilled for the Covered Software. + + 4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and + may publish revised and/or new versions of this License + from time to time. Each version will be given a + distinguishing version number. Except as provided in + Section 4.3, no one other than the license steward has the + right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. If the Initial Developer includes a + notice in the Original Software prohibiting it from being + distributed or otherwise made available under any + subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to + use, distribute or otherwise make the Covered Software + available under the terms of any subsequent version of the + License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a + new license for Your Original Software, You may create and + use a modified version of this License if You: (a) rename + the license and remove any references to the name of the + license steward (except to note that the license differs + from this License); and (b) otherwise make it clear that + the license contains terms which differ from this License. + + + 5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN ÒAS ISÓ + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF + ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + + 6. TERMINATION. + + 6.1. This License and the rights granted hereunder will + terminate automatically if You fail to comply with terms + herein and fail to cure such breach within 30 days of + becoming aware of the breach. Provisions which, by their + nature, must remain in effect beyond the termination of + this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or + a Contributor (the Initial Developer or Contributor against + whom You assert such claim is referred to as ÒParticipantÓ) + alleging that the Participant Software (meaning the + Contributor Version where the Participant is a Contributor + or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any + patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial + Developer (if the Initial Developer is not the Participant) + and all Contributors under Sections 2.1 and/or 2.2 of this + License shall, upon 60 days notice from Participant + terminate prospectively and automatically at the expiration + of such 60 day notice period, unless if within such 60 day + period You withdraw Your claim with respect to the + Participant Software against such Participant either + unilaterally or pursuant to a written agreement with + Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 + above, all end user licenses that have been validly granted + by You or any distributor hereunder prior to termination + (excluding licenses granted to You by any distributor) + shall survive termination. + + 7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTYÕS NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + + 8. U.S. GOVERNMENT END USERS. + + The Covered Software is a Òcommercial item,Ó as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of Òcommercial + computer softwareÓ (as that term is defined at 48 C.F.R. ¤ + 252.227-7014(a)(1)) and Òcommercial computer software + documentationÓ as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users + acquire Covered Software with only those rights set forth herein. + This U.S. Government Rights clause is in lieu of, and supersedes, + any other FAR, DFAR, or other clause or provision that addresses + Government rights in computer software under this License. + + 9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the + extent necessary to make it enforceable. This License shall be + governed by the law of the jurisdiction specified in a notice + contained within the Original Software (except to the extent + applicable law, if any, provides otherwise), excluding such + jurisdictionÕs conflict-of-law provisions. Any litigation + relating to this License shall be subject to the jurisdiction of + the courts located in the jurisdiction and venue specified in a + notice contained within the Original Software, with the losing + party responsible for costs, including, without limitation, court + costs and reasonable attorneysÕ fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall + be construed against the drafter shall not apply to this License. + You agree that You alone are responsible for compliance with the + United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + + 10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. diff --git a/cddl/contrib/dtracetoolkit/Docs/oneliners.txt b/cddl/contrib/dtracetoolkit/Docs/oneliners.txt new file mode 100644 index 0000000..fca2aa3 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Docs/oneliners.txt @@ -0,0 +1,81 @@ +# +# DTrace OneLiners +# + +DTrace One Liners, + +# New processes with arguments, +dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' + +# Files opened by process name, +dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' + +# Files created using creat() by process name, +dtrace -n 'syscall::creat*:entry { printf("%s %s",execname,copyinstr(arg0)); }' + +# Syscall count by process name, +dtrace -n 'syscall:::entry { @num[execname] = count(); }' + +# Syscall count by syscall, +dtrace -n 'syscall:::entry { @num[probefunc] = count(); }' + +# Syscall count by process ID, +dtrace -n 'syscall:::entry { @num[pid,execname] = count(); }' + +# Read bytes by process name, +dtrace -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }' + +# Write bytes by process name, +dtrace -n 'sysinfo:::writech { @bytes[execname] = sum(arg0); }' + +# Read size distribution by process name, +dtrace -n 'sysinfo:::readch { @dist[execname] = quantize(arg0); }' + +# Write size distribution by process name, +dtrace -n 'sysinfo:::writech { @dist[execname] = quantize(arg0); }' + +# Disk size by process ID, +dtrace -n 'io:::start { printf("%d %s %d",pid,execname,args[0]->b_bcount); }' + +# Disk size aggregation +dtrace -n 'io:::start { @size[execname] = quantize(args[0]->b_bcount); }' + +# Pages paged in by process name, +dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }' + +# Minor faults by process name, +dtrace -n 'vminfo:::as_fault { @mem[execname] = sum(arg0); }' + +# Interrupts by CPU, +dtrace -n 'sdt:::interrupt-start { @num[cpu] = count(); }' + +# CPU cross calls by process name, +dtrace -n 'sysinfo:::xcalls { @num[execname] = count(); }' + +# Lock time by process name, +dtrace -n 'lockstat:::adaptive-block { @time[execname] = sum(arg1); }' + +# Lock distribution by process name, +dtrace -n 'lockstat:::adaptive-block { @time[execname] = quantize(arg1); }' + +# Kernel funtion calls by module +dtrace -n 'fbt:::entry { @calls[probemod] = count(); }' + +# Stack size for processes +dtrace -n 'sched:::on-cpu { @[execname] = max(curthread->t_procp->p_stksize);}' + +# Kill all top processes when they are invoked, +dtrace -wn 'syscall::exece:return /execname == "top"/ { raise(9); }' + + + +DTrace Longer One Liners, + +# New processes with arguments and time, +dtrace -qn 'syscall::exec*:return { printf("%Y %s\n",walltimestamp,curpsinfo->pr_psargs); }' + +# Successful signal details, +dtrace -n 'proc:::signal-send /pid/ { printf("%s -%d %d",execname,args[2],args[1]->pr_pid); }' + + + |