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