xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/History (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1*c29d5175SchristosHistory - History of the DTraceToolkit
2*c29d5175Schristos
3*c29d5175Schristos------------------------------------------------------------------------------
4*c29d5175Schristos20-Apr-2005	Brendan Gregg	Idea
5*c29d5175Schristos	For a while I had thought that a DTrace toolkit would be a nice
6*c29d5175Schristos	idea, but on this day it became clear. I was explaining DTrace to
7*c29d5175Schristos	an SSE from Sun (Canberra, Australia), who had a need for using
8*c29d5175Schristos	DTrace but didn't have the time to sit down and write all the
9*c29d5175Schristos	tools he was after. It simply made sense to have a DTrace toolkit
10*c29d5175Schristos	that people could download or carry around a copy to use. Some
11*c29d5175Schristos	people would write DTrace tools, others would use the toolkit.
12*c29d5175Schristos------------------------------------------------------------------------------
13*c29d5175Schristos15-May-2005	Brendan Gregg	Version 0.30
14*c29d5175Schristos	I had discussed the idea of a DTrace toolkit with the Sun PAE guys in
15*c29d5175Schristos	Adelaide, Australia. It was making more sense now. It would be much
16*c29d5175Schristos	like the SE Toolkit, not just due to the large number of sample
17*c29d5175Schristos	scripts provided, but also due to the role it would play: few people
18*c29d5175Schristos	wrote SE Toolkit programs, more people used it as a toolkit. While
19*c29d5175Schristos	we would like a majority of Solaris users to write DTrace scripts,
20*c29d5175Schristos	the reality is that many would want to use a prewritten toolkit.
21*c29d5175Schristos	Today I created the toolkit as version 0.30, with 11 main directories,
22*c29d5175Schristos	a dozen scripts, man pages and a structure for documentation.
23*c29d5175Schristos------------------------------------------------------------------------------
24*c29d5175Schristos16-May-2005	Brendan Gregg	OneLiners
25*c29d5175Schristos	I've been using the toolkit for a day now (wow!), and have noticed
26*c29d5175Schristos	a few problems I've been fixing. One of them was the dtrace oneliners.
27*c29d5175Schristos	I have them in two files, Docs/oneliners.txt and the examples in
28*c29d5175Schristos	Docs/Examples/oneliners_examples.txt. The problem is that when I'm
29*c29d5175Schristos	looking for a script, I'm looking in Docs/Commands - a list of the
30*c29d5175Schristos	seperate script files, or I'm doing an ls or find. Ok, so I've now
31*c29d5175Schristos	made each one liner a seperate script. This seems at first pretty
32*c29d5175Schristos	silly since they are oneliners and shouldn't deserve an entire script
33*c29d5175Schristos	each, but I've found having them as seperate scripts makes them far
34*c29d5175Schristos	easier to find and use. The scripts and man page for each script do
35*c29d5175Schristos	point out the fact that it's a one liner.
36*c29d5175Schristos------------------------------------------------------------------------------
37*c29d5175Schristos17-May-2005	Brendan Gregg	Version 0.33
38*c29d5175Schristos	Version 0.33 with 33 scripts. Maybe I should make the version number
39*c29d5175Schristos	equal the script count. :) I just finished dtruss, dapptrace and
40*c29d5175Schristos	dappprof.
41*c29d5175Schristos------------------------------------------------------------------------------
42*c29d5175Schristos08-Jun-2005	Brendan Gregg	Name changes.
43*c29d5175Schristos	I've renamed Docs/Commands to Docs/Contents. I found myself typing
44*c29d5175Schristos	"more Docs/Contents" by mistake a lot. ok, maybe it made more sense
45*c29d5175Schristos	to call it Contents after all. I've also made a symlink to it called
46*c29d5175Schristos	Index.
47*c29d5175Schristos------------------------------------------------------------------------------
48*c29d5175Schristos08-Jun-2005	Brendan Gregg	Version 0.35
49*c29d5175Schristos	Version 0.35 with 35 scripts. Also touched up procsystime and some
50*c29d5175Schristos	man pages. Added the CDDL version 1.0.
51*c29d5175Schristos------------------------------------------------------------------------------
52*c29d5175Schristos09-Jun-2005	Brendan Gregg	Version 0.42
53*c29d5175Schristos	Added 7 more scripts.
54*c29d5175Schristos------------------------------------------------------------------------------
55*c29d5175Schristos14-Jun-2005	Brendan Gregg	Version 0.57
56*c29d5175Schristos	Added heaps of new scripts. Now at 57 scripts.
57*c29d5175Schristos------------------------------------------------------------------------------
58*c29d5175Schristos17-Jun-2005	Brendan Gregg	Version 0.61
59*c29d5175Schristos	Restyled many commands.
60*c29d5175Schristos------------------------------------------------------------------------------
61*c29d5175Schristos28-Jun-2005	Brendan Gregg	Version 0.70
62*c29d5175Schristos	Added several commands including dexplorer. Developed a few useful
63*c29d5175Schristos	variants of classic scripts while writing dexplorer, and have added
64*c29d5175Schristos	them to the toolkit (I kept wanting to run them individually but
65*c29d5175Schristos	not have to run an entire dexplorer).
66*c29d5175Schristos------------------------------------------------------------------------------
67*c29d5175Schristos25-Jul-2005	Brendan Gregg	Version 0.77
68*c29d5175Schristos	Added tcpsnoop.d, tcpsnoop, tcptop.  Because of their addition I have
69*c29d5175Schristos	dropped tcpwbytes.d and tcpwlist.  These are complex scripts, but they
70*c29d5175Schristos	track TCP in an accurate manner. However! also because they are
71*c29d5175Schristos	complex scripts, I expect they will require maintainence for newer
72*c29d5175Schristos	versions of [Open]Solaris, as various probes may change. They will
73*c29d5175Schristos	become much more stable once a network provider has been added to
74*c29d5175Schristos	DTrace (which may be some time away).
75*c29d5175Schristos	Also added iotop, and updated a bunch of scripts. A lot of work went
76*c29d5175Schristos	into this version, although the version change doesn't reflect that
77*c29d5175Schristos	(I'm still keeping the version number == to number of scripts).
78*c29d5175Schristos	Also added rwsnoop, rwtop, and more.
79*c29d5175Schristos------------------------------------------------------------------------------
80*c29d5175Schristos26-Jul-2005	Brendan Gregg	Version 0.82
81*c29d5175Schristos	Many new scripts added, many updates. This is a major release.
82*c29d5175Schristos------------------------------------------------------------------------------
83*c29d5175Schristos17-Sep-2005	Brendan Gregg	Version 0.83
84*c29d5175Schristos	A few scripts have been updated so that they work better.
85*c29d5175Schristos	execsnoop, iosnoop, opensnoop and rwsnoop will be more responsive
86*c29d5175Schristos	(increased switchrate).
87*c29d5175Schristos------------------------------------------------------------------------------
88*c29d5175Schristos22-Sep-2005	Brendan Gregg	Version 0.84
89*c29d5175Schristos	Some updates, fixed some bugs (cputimes, cpudists). Added cpuwalk.d.
90*c29d5175Schristos------------------------------------------------------------------------------
91*c29d5175Schristos15-Nov-2005	Brendan Gregg	Sys Admin Magazine
92*c29d5175Schristos	Ryan Matteson wrote an article on the DTraceToolkit which has been
93*c29d5175Schristos	printed in Sys Admin Magazine, December 2005. It's quite good,
94*c29d5175Schristos	and made it as the feature article - which means it will be available
95*c29d5175Schristos	online for some time. Thanks Matty, and Sys Admin Magazine!
96*c29d5175Schristos	"Observing I/O Behavior with the DTraceToolkit"
97*c29d5175Schristos	http://www.samag.com/documents/sam0512a/
98*c29d5175Schristos------------------------------------------------------------------------------
99*c29d5175Schristos01-Dec-2005	Brendan Gregg	Version 0.88
100*c29d5175Schristos	Many scripts were updated. Added the Apps category. I had planned
101*c29d5175Schristos	to add some key scripts, but they haven't made it out of testing yet.
102*c29d5175Schristos------------------------------------------------------------------------------
103*c29d5175Schristos03-Dec-2005	Brendan Gregg	Version 0.89
104*c29d5175Schristos	Added nfswisard.d, fixed a minor bug with tcp* tools (see
105*c29d5175Schristos	dtrace-discuss mailing list).
106*c29d5175Schristos------------------------------------------------------------------------------
107*c29d5175Schristos12-Jan-2006	Brendan Gregg	Version 0.92
108*c29d5175Schristos	Added a few scripts including rwbytype.d. Fixed several issues.
109*c29d5175Schristos------------------------------------------------------------------------------
110*c29d5175Schristos09-Apr-2006	Brendan Gregg	Solaris Internals 2nd Edition
111*c29d5175Schristos	In the past few months I have been contributing to Solaris Internals
112*c29d5175Schristos	2nd Edition. This book (now two volumes) is really amazing. The 2nd
113*c29d5175Schristos	volume does use the DTraceToolkit where appropriate, and covers loads
114*c29d5175Schristos	of useful topics. While writing and reviewing material for Solaris
115*c29d5175Schristos	Internals, I've had numerous new ideas for DTrace scripts. Not only
116*c29d5175Schristos	that, but a few people have managed to send me well styled, carefully
117*c29d5175Schristos	tested, well considered DTrace scripts for inclusion in the toolkit.
118*c29d5175Schristos------------------------------------------------------------------------------
119*c29d5175Schristos20-Apr-2006	Brendan Gregg	TCP bug fixed
120*c29d5175Schristos	Stefan Parvu sent me a bug for the tcp* scripts: on build 31+ they
121*c29d5175Schristos	error'd on the symbol SS_TCP_FAST_ACCEPT. This symbol was
122*c29d5175Schristos	renamed to SS_DIRECT (I checked the code, they are used in the
123*c29d5175Schristos	same way). Ironically, when I first wrote the scripts I had hardcoded
124*c29d5175Schristos	the value 0x00200000, then rewrote it "properly" by importing
125*c29d5175Schristos	the header files and using the symbol name. Had I been lazy and left
126*c29d5175Schristos	it hardcoded, the bug would never have eventuated. Not to worry,
127*c29d5175Schristos	it has returned to being hardcoded, so that it works on all builds
128*c29d5175Schristos	(until something else changes).
129*c29d5175Schristos------------------------------------------------------------------------------
130*c29d5175Schristos21-Apr-2006	Brendan Gregg	Restyled - again!
131*c29d5175Schristos	I've been writing the "DTraceToolkit Style Guide", to document
132*c29d5175Schristos	the style that these scripts obey. It is quite strict, and sets
133*c29d5175Schristos	the bar fairly high. I've been warned that it may cause very few
134*c29d5175Schristos	people to ever contribute scripts, which is fine. At some point
135*c29d5175Schristos	I'll carefully explain the mentality behind this, but in a nutshell:
136*c29d5175Schristos	Users on critical production servers expect the tools to be
137*c29d5175Schristos	accurate, carefully tested, and cause no undocumented harm.
138*c29d5175Schristos------------------------------------------------------------------------------
139*c29d5175Schristos22-Apr-2006	Brendan Gregg	Docs changes
140*c29d5175Schristos	The "Contrib" file was merged into the "Who" file. In hindsight
141*c29d5175Schristos	it is better to keep this data together than to split it up.
142*c29d5175Schristos------------------------------------------------------------------------------
143*c29d5175Schristos24-Apr-2006	Brendan Gregg	Version 0.96
144*c29d5175Schristos	The toolkit now contains 104 scripts, however I'll keep the version
145*c29d5175Schristos	number < 1.00 until the dust has settled on these new scripts.
146*c29d5175Schristos	There is some special significance with version 1.00, it would
147*c29d5175Schristos	imply that every script had been tested for some time - not that
148*c29d5175Schristos	I've just added a few.
149*c29d5175Schristos	There is a new main directory, FS for file system related scripts.
150*c29d5175Schristos	There are some interesting scripts in there, from or based on
151*c29d5175Schristos	Solaris Internals 2nd ed, vol 2.
152*c29d5175Schristos------------------------------------------------------------------------------
153*c29d5175Schristos30-Sep-2007	Brendan Gregg	Version 0.99
154*c29d5175Schristos	It's been a year and a half since the last release, and a lot has
155*c29d5175Schristos	happneed. Firstly, the DTraceToolkit has featured in the Prentice Hall
156*c29d5175Schristos	book,
157*c29d5175Schristos		Solaris Performance and Tools
158*c29d5175Schristos		   DTrace and mdb techniques for Solaris 10 and OpenSolaris
159*c29d5175Schristos
160*c29d5175Schristos	written by Richard McDougall, Jim Mauro and myself. It is a companion
161*c29d5175Schristos	book to "Solaris Internals 2nd edition" by Richard McDougall and
162*c29d5175Schristos	Jim Mauro. If you are serious about becomming a DTrace guru,
163*c29d5175Schristos	especially on Solaris, then please study both books. (Yes, I realize
164*c29d5175Schristos	that many people are using the DTraceToolkit because they don't have
165*c29d5175Schristos	the time or don't want to become DTrace gurus; well, so long as
166*c29d5175Schristos	you are using DTrace anyway :). The performance book was a great relief
167*c29d5175Schristos	to write - since we were able to put to print much performance wisdom
168*c29d5175Schristos	and knowledge that was begging to be documented.
169*c29d5175Schristos
170*c29d5175Schristos	Then, in late 2006 I joined an advanced products engineering team
171*c29d5175Schristos	at Sun in San Francisco, a team which includes the three members of
172*c29d5175Schristos	team DTrace. It's been a great opportunity to learn from such
173*c29d5175Schristos	engineers, and to contribute more directly to DTrace. So far my work
174*c29d5175Schristos	has included writing a JavaScript provider, integrated inet_ntoa()
175*c29d5175Schristos	style functions into DTrace, and prototying DTrace IP, TCP and UDP
176*c29d5175Schristos	providers.
177*c29d5175Schristos
178*c29d5175Schristos	Working on the network providers is good news for the DTraceToolkit,
179*c29d5175Schristos	as it will indirectly help the tcp* scripts become more stable. Yes,
180*c29d5175Schristos	those scripts have broken a few more times during the last 18 months,
181*c29d5175Schristos	sorry about that, and it will keep happening until we have stable
182*c29d5175Schristos	network providers. This is why I only ever wrote three tcp* scripts,
183*c29d5175Schristos	and not at least a dozen, which I'd really like to do.
184*c29d5175Schristos
185*c29d5175Schristos	I did leave my pile of old SPARC and x86 development servers behind
186*c29d5175Schristos	in Australia, and brought over a couple of laptops. That has made me
187*c29d5175Schristos	more dependant on Stefan for testing the toolkit - especially on SPARC.
188*c29d5175Schristos
189*c29d5175Schristos	So, it's been about 18 months since the last release, which is
190*c29d5175Schristos	mostly due to having less spare time due to moving countries and
191*c29d5175Schristos	learning a new job.
192*c29d5175Schristos
193*c29d5175Schristos	Michelle from Sun docs has been asking for a newer version of the
194*c29d5175Schristos	DTraceToolkit for the OpenSolaris starter kit, which is why I'm
195*c29d5175Schristos	releasing this version now and not waiting a few more weeks as
196*c29d5175Schristos	I complete bug fixes.
197*c29d5175Schristos
198*c29d5175Schristos	So the good and the bad news for this release, starting with the bad,
199*c29d5175Schristos
200*c29d5175Schristos	Bad: tcpsnoop/tcptop still don't work on some Solaris 10 releases.
201*c29d5175Schristos	I've added versions that should work on Solaris Nevada and OpenSolaris
202*c29d5175Schristos	for releases from around late 2007. They are likely to break again.
203*c29d5175Schristos	The real answer, as always, is for stable nework providers to be
204*c29d5175Schristos	integrated into Solaris.
205*c29d5175Schristos
206*c29d5175Schristos	Many of the exciting new language provider scripts in this release
207*c29d5175Schristos	currently require downloading, patching and compling of the language
208*c29d5175Schristos	interpreter to get working. See the Readme file in each directory
209*c29d5175Schristos	for pointers.
210*c29d5175Schristos
211*c29d5175Schristos	Good: many more scripts to cover the new DTrace language providers
212*c29d5175Schristos	that are available (the DTraceToolkit is now 227 scripts). Many
213*c29d5175Schristos	updates to the Notes directory. Bug fixes. Some new categories
214*c29d5175Schristos	other than for scripts: Code - for simple programs to DTrace (and
215*c29d5175Schristos	for the example files), and Snippits - for useful lumps of DTrace
216*c29d5175Schristos	code to copy-n-paste from. The man pages are also making room
217*c29d5175Schristos	for documenting both stability and supported operating systems for
218*c29d5175Schristos	each script - now that DTrace exists for MacOS X Leopard, the
219*c29d5175Schristos	DTraceToolkit will begin supporting multiple operating systems.
220*c29d5175Schristos
221*c29d5175Schristos	This can be thought of as a developer's release of the DTraceToolkit -
222*c29d5175Schristos	to help people start using DTrace with Perl, Python, Ruby, Php, Java,
223*c29d5175Schristos	JavaScript, Shell and Tcl. I've written about 15 scripts for each
224*c29d5175Schristos	language, to cover the basics and to show the way for deeper analysis.
225*c29d5175Schristos	The scripts are also similar from one language to another, having
226*c29d5175Schristos	devoleped a tried-and-tested group of scripts for analyzing real world
227*c29d5175Schristos	issues - it made sense to repeat these scripts for every language
228*c29d5175Schristos	possible. To see what I mean, try reading,
229*c29d5175Schristos
230*c29d5175Schristos	   Examples/j_cputime_example.txt     Examples/py_cputime_example.txt
231*c29d5175Schristos	   Examples/js_cputime_example.txt    Examples/rb_cputime_example.txt
232*c29d5175Schristos	   Examples/php_cputime_example.txt   Examples/sh_cputime_example.txt
233*c29d5175Schristos	   Examples/pl_cputime_example.txt    Examples/tcl_cputime_example.txt
234*c29d5175Schristos
235*c29d5175Schristos	You might notice that the example files are more clearly and carefully
236*c29d5175Schristos	explained. Claire (my wife), wrote close to one hundred of them for
237*c29d5175Schristos	this release while I focused on writing and testing the scripts.
238*c29d5175Schristos	Claire has worked as a SysAdmin and as an IT instructor, and is well
239*c29d5175Schristos	skilled at explaining relavent technical details. And she can spell
240*c29d5175Schristos	much better than I can. :)
241*c29d5175Schristos
242*c29d5175Schristos	The future: I still have many new scripts and some bug fixes in mind,
243*c29d5175Schristos	as well as generally improving the Notes and Examples provided.
244*c29d5175Schristos	Hopefully it won't be too many months before you see another
245*c29d5175Schristos	release. Check here for the lastest installment,
246*c29d5175Schristos
247*c29d5175Schristos	http://www.opensolaris.org/os/community/dtrace/dtracetoolkit
248*c29d5175Schristos------------------------------------------------------------------------------
249*c29d5175Schristos
250