From bmc at zion.eng.sun.com Sun Dec 5 15:30:40 2004 From: bmc at zion.eng.sun.com (Bryan Cantrill) Date: Sun, 5 Dec 2004 15:30:40 -0800 (PST) Subject: [DTrace] Welcome to DTrace@OpenSolaris! Message-ID: <200412052330.iB5NUe26445978@zion.eng.sun.com> All, A belated welcome to the DTrace list at opensolaris.org. Apologies for the growing pains, including (but not limited to) the incorrect "From:" line, the strange address (as others have pointed out, "www" has no place in an e-mail address) and the fact that the DTrace team wasn't actually on the list. (As it turns out, being an administrator of a list doesn't mean that you're automatically on it.) All of these problems have now been rectified, so please let us know if anything else seems amiss. Presumably most (all?) of you know something about DTrace, and we would suspect many (all?) of you have actually used DTrace. But if you haven't heard of DTrace, check out the BigAdmin page: http://www.sun.com/bigadmin/content/dtrace And if you haven't used DTrace, then you don't know what you're missing; snag the Solaris Express 11/04 and (as Jarod would say), "giddyup": http://wwws.sun.com/software/solaris/solaris-express/get.jsp For those of you who don't know us, we are Bryan Cantrill, Mike Shapiro and Adam Leventhal -- we are the engineers behind DTrace. There are many other DTrace personalities ("personalities.d"?) here or lurking, so let us take a second to introduce you to some of your fellow list members: - Jarod Jenson. First person to see or use DTrace outside of Sun. Holds most of the American indoor DTrace records, including Biggest Performance Win, Fastest Time to 2X, and Most Performance Wins (Career). The Babe Ruth of DTrace. - Jon Haslam. Avid DTrace user, developer of DTrace visualization tools, and the canonical DTrace early adopter: http://blogs.sun.com/roller/page/bmc/20040617#the_early_adopters - Brendan Gregg. First person to post DTrace scripts on the web. Of generally twisted mind, Brendan also wrote the first D script (shellsnoop.d) that is universally described as either "scary" or "spooky". - Robert Milkowski. To the best of our knowledge, the first person outside of Sun to run DTrace in production. Honorary DTrace ambassador to pl.comp.os.linux and pl.comp.sys.sun.admin. - Dan Price. On a quest to automate us out of our moonlighting job as DTrace hucksters, Dan has developed a Java application that can be used to easily show off the power of DTrace. Perhaps Dan can be pursuaded to release this under CDDL? - Alan Hargreaves. Prolific blogger, DTrace user and advocate. Others from outside Sun will presumably join as OpenSolaris opens to the general public. As for other DTrace users inside Sun, they'll be here as soon as we transition our internal means of distributing information to opensolaris.org (see below) -- so you'll soon meet long-time users of DTrace inside of Sun like Gavin Maltby, Jonathan Adams and Bart Smaalders. But enough pleasantries -- what are the DTrace plans with respect to OpenSolaris? For starters, we want to open all of our internal DTrace content and make opensolaris.org the home for all DTrace content going forward. Specifically: - We have a DTrace interest list internally at Sun. This list has been around since the project's inception, and now has over 300 members. We intend to eliminate this list; this opensolaris.org list will become the canonical DTrace list. We also plan to move the existing dtrace-interest archives (which consists of over 2500 messages spanning over two years) to the opensolaris.org list. This will allow you to search the extensive archives for answers to questions, and will allow you to browse past design discussions. - We plan on adding much more content to the DTrace web here on OpenSolaris. We have an internal DTrace web site, as well as the BigAdmin site. Our goal is to have both simply point to the opensolaris.org site, which will be the canonical source for DTrace information. - We plan on making public all of our internal presentations on DTrace, including the very first DTrace presentation from October 1999 -- over five years ago! In short, we intend to keep you just as informed as to ongoing DTrace development as anyone internal to Sun. (Indeed, anyone internal to Sun who wishes to stay abreast of DTrace development will be directed to opensolaris.org.) And where do we need your help? There are a few obvious ways that everyone can help DTrace: - Contribute DTrace scripts. We plan to put together a page containing DTrace recipes, similar to a page that we have internally. We would like you to contribute your best scripts, along with examples of how to use them. - Make additions to the DTrace web pages on opensolaris.org. Because opensolaris.org is a wiki, anyone can make additions to virtually any page. Don't hesitate to make additions or modifications where you see fit! - Let us know where DTrace falls short. In many ways, the most productive request for enhancement is a description of how DTrace _couldn't_ help you solve your problem -- with as much detail about your problem as possible. This is helpful for you because you can be sure that we develop exactly the technology you need to solve your real-world problems -- and it helps us avoid needless feature creep by assuring us that the enhancement that you're requesting has real-world application. And how about those of you who have the itch to edit some source code? There are a few areas where we see potential for community involvement in the ongoing development of DTrace: - Stable providers. The stable providers make available semantically stable probes in specified parts of the system. We implemented several of these for Solaris 10 (proc, sched, io, mib, vminfo, sysinfo, fpuinfo), but it isn't enough: we need stable providers for every major area of the kernel. Some of this is in progress. For example, when he's not busy defending our coding style, Keith Wesolowski on the OpenSolaris team is leading the charge on an ipc provider. But we need networking providers (socket and/or tcp and/or ip), an nfs provider, a vm provider, and probably a few others. It isn't easy to develop a stable provider -- it can be surprisingly difficult to develop semantics that are sufficiently abstract to not overly constrain implementation, but not so abstract as to be useless. Moreover, we have found that the biggest challenge can be providing not only the right probes, but the right arguments for those probes. In some cases, providing the right arguments can require substantial work on the subsystem. (For example, it would not have been possible to provide the file information for the io probes had it not been for Eric Schrock's pathname caching work -- and even then it required some surgery to the I/O subsystem to connect the dots.) - Stable user-level providers. In Build 67, Adam added support for stable user-level providers and (in particular) added the plockstat provider to libc. There are many more of these that can be added to the system. In particular, it would be valuable to add stable providers to environments such as MySQL, Apache, Perl, etc. - Stabilizing and documenting libdtrace. The library interface to DTrace has become increasingly stable, but we still need to document it and commit to it. If you want to get involved in this, you can start by writing your own libdtrace consumer (by copying intrstat(1M) or dtrace(1M)) -- which will make you appreciate how sorely we need documentation! - libdtrace bindings to either languages. We're currently working on a JNI interface for libdtrace, but we'd love to see libdtrace bindings for languages like Python and Perl. Let us know if you're interested in any of the above, and we'll work on getting you (and everyone, for that matter) the details required to get started. Anyway, welcome. In case you haven't already inferred it, we're thrilled to have you here -- and we're thrilled to be here ourselves... Keep on tracing, Bryan, Mike and Adam -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc From dp at eng.sun.com Sun Dec 5 16:49:19 2004 From: dp at eng.sun.com (Dan Price) Date: Sun, 5 Dec 2004 16:49:19 -0800 Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <200412052330.iB5NUe26445978@zion.eng.sun.com> References: <200412052330.iB5NUe26445978@zion.eng.sun.com> Message-ID: <20041206004919.GH9710@eng.sun.com> On Sun 05 Dec 2004 at 03:30PM, Bryan Cantrill wrote: > - Dan Price. On a quest to automate us out of our moonlighting job as > DTrace hucksters, Dan has developed a Java application that can be used > to easily show off the power of DTrace. Perhaps Dan can be pursuaded > to release this under CDDL? It's already in the works, except to say that I haven't yet gone through the "which license to use" part in any detail. One of the things I'm learning is that we (Sun) are still figuring out how to open source smaller works without incurring large amounts of (costly) process. I decided to test this process out, because we have a lot of "home directory" software in the kernel group (and in the wider inside-Sun Solaris Community) which we should be sharing with the wider community going forward. -dp -- Daniel Price - Solaris Kernel Engineering - dp at eng.sun.com - blogs.sun.com/dp From sloveridge at gmail.com Sun Dec 5 16:59:05 2004 From: sloveridge at gmail.com (Shanon Loveridge) Date: Mon, 6 Dec 2004 11:59:05 +1100 Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <200412052330.iB5NUe26445978@zion.eng.sun.com> References: <200412052330.iB5NUe26445978@zion.eng.sun.com> Message-ID: <9c74bdd704120516595dc1d71d@mail.gmail.com> On Sun, 5 Dec 2004 15:30:40 -0800 (PST), Bryan Cantrill wrote: > But enough pleasantries -- what are the DTrace plans with respect to > OpenSolaris? For starters, we want to open all of our internal DTrace > content and make opensolaris.org the home for all DTrace content going > forward. Hey Bryan thanks for the excellent introduction. First of all I am overwhelmingly happy about opensolaris.org becoming the source for all dtrace development / content both internal and external. It is statements like this that keep my faith in the success of the opensolaris community. > - Make additions to the DTrace web pages on opensolaris.org. Because > opensolaris.org is a wiki, anyone can make additions to virtually any > page. Don't hesitate to make additions or modifications where you see > fit! Can you clarify how this can be done? It is my understanding that a wiki was going to be set up but has not been done so yet. ... snip .... > > Let us know if you're interested in any of the above, and we'll work on > getting you (and everyone, for that matter) the details required to get > started. Personally I would be vary happy to contribute to the dtrace project once I finish a white paper I am currently writing on looking into solaris processes. Which leads me to a request. I would personally like to see a mailing list / project area like the dtrace area but for mdb / kernel and crash debugging. Is there a team in Sun similar to you guys that I could talk to about this ? Once again thanks for your welcome and openness. Shanon -- "We can debug relationships, but it's always good policy to consider the people themselves to be features. People get annoyed when you try to debug them." Larry Wall From ahl at eng.sun.com Sun Dec 5 21:17:20 2004 From: ahl at eng.sun.com (Adam Leventhal) Date: Sun, 5 Dec 2004 21:17:20 -0800 Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <9c74bdd704120516595dc1d71d@mail.gmail.com> References: <200412052330.iB5NUe26445978@zion.eng.sun.com> <9c74bdd704120516595dc1d71d@mail.gmail.com> Message-ID: <20041206051720.GC448224@eng.sun.com> On Mon, Dec 06, 2004 at 11:59:05AM +1100, Shanon Loveridge wrote: > ... I would personally > like to see a mailing list / project area like the dtrace area but for > mdb / kernel and crash debugging. Is there a team in Sun similar to > you guys that I could talk to about this ? Hey Shanon, Great idea. You're certainly asking the right people -- Mike wrote the initial version of mdb with some significant contributions from Bryan and I help to develop it now. I'll work with the opensolaris.org folks to get an mdb area to talk about this sort of stuff. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl From bmc at zion.eng.sun.com Sun Dec 5 21:42:27 2004 From: bmc at zion.eng.sun.com (Bryan Cantrill) Date: Sun, 5 Dec 2004 21:42:27 -0800 (PST) Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <20041206051720.GC448224@eng.sun.com> from Adam Leventhal at "Dec 5, 2004 09:17:20 pm" Message-ID: <200412060542.iB65gRlZ448636@zion.eng.sun.com> > On Mon, Dec 06, 2004 at 11:59:05AM +1100, Shanon Loveridge wrote: > > ... I would personally > > like to see a mailing list / project area like the dtrace area but for > > mdb / kernel and crash debugging. Is there a team in Sun similar to > > you guys that I could talk to about this ? > > Great idea. You're certainly asking the right people -- Mike wrote the > initial version of mdb with some significant contributions from Bryan and > I help to develop it now. I definitely laughed out loud when you asked if there was a team in Sun "similar" to us for mdb -- it's so similar, it _is_ us! ;) If postmortem debugging floats your boat, you may be one of the dozen-or-so people on the planet interested in a paper that I presented at AADEBUG last year; it describes a new technique for debugging memory corruption that was developed as an mdb dcmd: http://arxiv.org/abs/cs/0309037 An mdb area on opensolaris.org is definitely something we need to do: it will give us a place to hang arcane work like the above, and it will give us a forum to discuss work that's coming down the pike (e.g. CTF for user apps -- yum!). - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc From sloveridge at gmail.com Sun Dec 5 21:52:24 2004 From: sloveridge at gmail.com (Shanon Loveridge) Date: Mon, 6 Dec 2004 16:52:24 +1100 Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <20041206051720.GC448224@eng.sun.com> References: <200412052330.iB5NUe26445978@zion.eng.sun.com> <9c74bdd704120516595dc1d71d@mail.gmail.com> <20041206051720.GC448224@eng.sun.com> Message-ID: <9c74bdd70412052152706526e5@mail.gmail.com> On Sun, 5 Dec 2004 21:17:20 -0800, Adam Leventhal wrote: > On Mon, Dec 06, 2004 at 11:59:05AM +1100, Shanon Loveridge wrote: > > ... I would personally > > like to see a mailing list / project area like the dtrace area but for > > mdb / kernel and crash debugging. Is there a team in Sun similar to > > you guys that I could talk to about this ? > > Hey Shanon, > > Great idea. You're certainly asking the right people -- Mike wrote the > initial version of mdb with some significant contributions from Bryan and > I help to develop it now. I'll work with the opensolaris.org folks to get > an mdb area to talk about this sort of stuff. Hey Adam thats excellent news! After talking to a few admins I got the feeling that people consider mdb to be a big dark scary area. I had a look around on the web and could not find much information on it other than the reference guide and some examples on blogs.sun.com. Because of this I decided a good way to learn would be to write up a white paper on looking at processes using mdb, which is currently in progress. If a project is created on onpensolaris.org before I finish I might have a few questions for the list. Regardless I will submit it to be put in the project area if people think it is useful. Shanon -- "We can debug relationships, but it's always good policy to consider the people themselves to be features. People get annoyed when you try to debug them." Larry Wall From mws at poptart.sfbay.sun.com Sun Dec 5 21:59:35 2004 From: mws at poptart.sfbay.sun.com (Michael Shapiro) Date: Sun, 5 Dec 2004 21:59:35 -0800 (PST) Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <9c74bdd70412052152706526e5@mail.gmail.com> from Shanon Loveridge at "Dec 6, 2004 04:52:24 pm" Message-ID: <200412060559.iB65xZt4106039@poptart.sfbay.sun.com> > On Sun, 5 Dec 2004 21:17:20 -0800, Adam Leventhal wrote: > > On Mon, Dec 06, 2004 at 11:59:05AM +1100, Shanon Loveridge wrote: > > > ... I would personally > > > like to see a mailing list / project area like the dtrace area but for > > > mdb / kernel and crash debugging. Is there a team in Sun similar to > > > you guys that I could talk to about this ? > > > > Hey Shanon, > > > > Great idea. You're certainly asking the right people -- Mike wrote the > > initial version of mdb with some significant contributions from Bryan and > > I help to develop it now. I'll work with the opensolaris.org folks to get > > an mdb area to talk about this sort of stuff. > > Hey Adam thats excellent news! > > After talking to a few admins I got the feeling that people consider > mdb to be a big dark scary area. I had a look around on the web and > could not find much information on it other than the reference guide > and some examples on blogs.sun.com. > > Because of this I decided a good way to learn would be to write up a > white paper on looking at processes using mdb, which is currently in > progress. If a project is created on onpensolaris.org before I finish > I might have a few questions for the list. Regardless I will submit it > to be put in the project area if people think it is useful. > > Shanon The most detailed source of information is the "Solaris Modular Debugger Guide" and its companion the mdb(1) man page. The Solaris 10 version of the former can be found on docs.sun.com at this URL: http://docs.sun.com/app/docs/doc/816-5041 Due to time constraints, I haven't really had time to expand the guide with more tutorial-style stuff: the material there is more of a reference only. We did do a much better job in including tutorials with the DTrace guide. If there is tutorial-style information you'd like to see in either guide, please let us know. Also, it would be great if you create some content and post it to OpenSolaris.org to actually include it in the guide. I'll look into getting a policy for this set up, but in general if you just create some simple HTML we can easily convert it to the SGML that is used for the official Sun documentation books. -Mike -- Mike Shapiro, Solaris Kernel Development. From bmc at zion.eng.sun.com Sun Dec 5 22:05:19 2004 From: bmc at zion.eng.sun.com (Bryan Cantrill) Date: Sun, 5 Dec 2004 22:05:19 -0800 (PST) Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <200412060559.iB65xZt4106039@poptart.sfbay.sun.com> from Michael Shapiro at "Dec 5, 2004 09:59:35 pm" Message-ID: <200412060605.iB665JAI448848@zion.eng.sun.com> Hey Shanon, > The most detailed source of information is the "Solaris Modular Debugger Guide" > and its companion the mdb(1) man page. The Solaris 10 version of the former > can be found on docs.sun.com at this URL: > > http://docs.sun.com/app/docs/doc/816-5041 > > Due to time constraints, I haven't really had time to expand the guide with > more tutorial-style stuff: the material there is more of a reference only. > We did do a much better job in including tutorials with the DTrace guide. In the particular realm of memory debugging, there is a little bit of tutorial material out there. In particular, you may want to check out Rob Benson's tutorial on using mdb and libumem: http://access1.sun.com/techarticles/libumem.html Another source to consult on this topic is Jonathan Adam's blog: http://blogs.sun.com/jwadams All things that will be linked to from the soon-to-be mdb area on opensolaris.org, I'm sure... - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc From dp at eng.sun.com Sun Dec 5 23:06:18 2004 From: dp at eng.sun.com (Dan Price) Date: Sun, 5 Dec 2004 23:06:18 -0800 Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <9c74bdd70412052152706526e5@mail.gmail.com> References: <200412052330.iB5NUe26445978@zion.eng.sun.com> <9c74bdd704120516595dc1d71d@mail.gmail.com> <20041206051720.GC448224@eng.sun.com> <9c74bdd70412052152706526e5@mail.gmail.com> Message-ID: <20041206070618.GN25407@eng.sun.com> On Mon 06 Dec 2004 at 04:52PM, Shanon Loveridge wrote: > Hey Adam thats excellent news! > > After talking to a few admins I got the feeling that people consider > mdb to be a big dark scary area. I had a look around on the web and > could not find much information on it other than the reference guide > and some examples on blogs.sun.com. > > Because of this I decided a good way to learn would be to write up a > white paper on looking at processes using mdb, which is currently in > progress. If a project is created on onpensolaris.org before I finish > I might have a few questions for the list. Regardless I will submit it > to be put in the project area if people think it is useful. Shanon, One thing we almost always do in the Solaris group is to solicit peer review when creating writeups like this. If you'd like, send along a draft at some point, and I'm sure at least one person hanging out on this list (from Sun or not) will have time to take a look and give you some feedback. -dp -- Daniel Price - Solaris Kernel Engineering - dp at eng.sun.com - blogs.sun.com/dp From schilling at fokus.fraunhofer.de Mon Dec 6 08:06:32 2004 From: schilling at fokus.fraunhofer.de (Joerg Schilling) Date: Mon, 06 Dec 2004 17:06:32 +0100 Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <20041206004919.GH9710@eng.sun.com> References: <200412052330.iB5NUe26445978@zion.eng.sun.com> <20041206004919.GH9710@eng.sun.com> Message-ID: <41B48388.nailIPGJH56SI@burner> Dan Price wrote: > One of the things I'm learning is that we (Sun) are still figuring out > how to open source smaller works without incurring large amounts of > (costly) process. I decided to test this process out, because we have a > lot of "home directory" software in the kernel group (and in the wider > inside-Sun Solaris Community) which we should be sharing with the wider > community going forward. So it seems that you have similar problems with those project as I have with CDDL. If we could find an easy and inexpensive to use license for all projects, this would help everyone. J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) If you don't have iso-8859-1 schilling at fokus.fraunhofer.de (work) chars I am J"org Schilling URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily From max at bruningsystems.com Tue Dec 7 19:16:29 2004 From: max at bruningsystems.com (Max Bruning) Date: Tue, 7 Dec 2004 19:16:29 -0800 (PST) Subject: [DTrace] dtrace/kmdb/mdb question/request Message-ID: <35935.68.185.88.229.1102475789.squirrel@www-yellow.garlic.com> Hi. I would like to use mdb dcmds/walkers within dtrace scripts. I filed an RFE for this a while back. Basically, what I would like to do is something like: foo:entry /blah blah/ { mdb_cmd("%x::print struct foo", bar); /* bar could be an arg, or other variable */ mdb_cmd("::threadlist -v"); mdb_cmd("%x::walk crud | ::mydcmd"); /* pipe output of a walker to my dcmd */ } Perhaps dtrace using mdb's dmods... Also, there is a way to do almost what I want using kmdb via the breakpoint action, if I could somehow pass a string with commands to breakpoint(). Something like foo:entry { breakpoint("kmdb commands"); } Speaking of kmdb (and mdb for that matter), does anyone know how to specify multiple kmdb/mdb commands when you hit a break/watch point? I sometimes want to do something like: foo::bp " from Max Bruning at "Dec 7, 2004 07:16:29 pm" Message-ID: <200412080659.iB86xiNv493774@zion.eng.sun.com> Hey Max, > I would like to use mdb dcmds/walkers within dtrace scripts. > I filed an RFE for this a while back. Basically, what I would like to do > is something like: > > foo:entry > /blah blah/ > { > mdb_cmd("%x::print struct foo", bar); /* bar could be an arg, or other > variable */ > mdb_cmd("::threadlist -v"); > mdb_cmd("%x::walk crud | ::mydcmd"); /* pipe output of a walker to my > dcmd */ > } > > Perhaps dtrace using mdb's dmods... We intend to provide ::print-like abilities for DTrace; there has been an RFE open on this for a while: 4968681 would like ::printf-like functionality in DTrace ::walk functionality is much trickier, as there is no way to iterate over structures in D (in part because such iteration would violate the safety constraint). > Also, there is a way to do almost what I want using kmdb > via the breakpoint action, if I could somehow pass a string > with commands to breakpoint(). > Something like > > foo:entry > { > breakpoint("kmdb commands"); > } I think you're the first person to ask about this. This is definitely within the realm of possibility; we'll get an RFE open on this.... > Speaking of kmdb (and mdb for that matter), does anyone know how to specify > multiple kmdb/mdb commands when you hit a break/watch point? > > I sometimes want to do something like: > > foo::bp " debugger */ If you can't bring mdb to DTrace, bring DTrace to mdb? ;) You can do this by separating the commands with a semicolon: % mdb /usr/bin/date > main:b > :r mdb: stop at main mdb: target stopped at: main: pushl %ebp > malloc::bp -c " :c 0x8047658: libc.so.1`calloc+0x4b 0x8047654: libc.so.1`_textdomain_u+0x5d 0x8047710: libc.so.1`get_zone+0x5a Tue Dec 7 22:59:36 PST 2004 mdb: target has terminated > And FWIW, one of things that we've talked about is adding rudimentary D support (and a DIF interpreter) to mdb -- which may well turn out to be an idea that's more of an interesting idea than a good idea... - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc From brendan.gregg at tpg.com.au Mon Dec 20 05:48:48 2004 From: brendan.gregg at tpg.com.au (Brendan Gregg) Date: Tue, 21 Dec 2004 00:48:48 +1100 (EST) Subject: [DTrace] Welcome to DTrace@OpenSolaris! In-Reply-To: <200412052330.iB5NUe26445978@zion.eng.sun.com> Message-ID: G'Day Bryan, DTrace folks, On Sun, 5 Dec 2004, Bryan Cantrill wrote: [...] > > - Brendan Gregg. First person to post DTrace scripts on the web. Of > generally twisted mind, Brendan also wrote the first D script > (shellsnoop.d) that is universally described as either "scary" or > "spooky". Actually, I recently did a spooky demo of Solaris 10, I had people login to a Solaris 10 server and try out commands - and while they were busy typing I brought up execsnoop.d on a data projector screen, # /execsnoop.d TIME UID PID PPID CMD 130867921406 100 18655 17469 ls 130882410539 100 18658 17469 vi /etc/hosts [...] I started asking why people were editing certain files and they were stunned that I 'knew' what was happening. They eventually saw the screen and were mesmerised by it. DTrace knew all. [...] > - Contribute DTrace scripts. We plan to put together a page containing > DTrace recipes, similar to a page that we have internally. We would > like you to contribute your best scripts, along with examples of > how to use them. My scripts will become much nicer when arguments are optional, at the moment they are a bit ugly. Gee, I could have -d for timestamps, -(erm?)h for human readable timestamps (I noticed the new additions for time formating which are very cool :). ... I could always wrap my D scripts in the Bourne shell, but that would be cheating. Not to mention that seeing -eq's and =='s in the same script would be somewhat rude. [...] > And how about those of you who have the itch to edit some source code? > There are a few areas where we see potential for community involvement > in the ongoing development of DTrace: > > - Stable providers. The stable providers make available semantically [...] Cool, many things to think about. A Sun::Solaris::DTrace library for Perl would be interesting, along with Sun::Solaris::Kstat it would make for some killer tools. I already have a Perl /proc interface - this could all combine to give us a prstat with a %I/O and %Net, etc... Brendan [Sydney, Australia] From max at bruningsystems.com Tue Dec 21 09:33:40 2004 From: max at bruningsystems.com (Max Bruning) Date: Tue, 21 Dec 2004 09:33:40 -0800 (PST) Subject: [DTrace] dtrace script request In-Reply-To: <200412080659.iB86xiNv493774@zion.eng.sun.com> References: <35935.68.185.88.229.1102475789.squirrel@www-yellow.garlic.com> from Max Bruning at "Dec 7, 2004 07:16:29 pm" <200412080659.iB86xiNv493774@zion.eng.sun.com> Message-ID: <54533.68.185.88.229.1103650420.squirrel@www-yellow.garlic.com> Hi All, I don't know if this is the appropriate list, but I would like to see a repository or contributor's directory of dtrace scripts. I have been teaching dtrace in classes for over a year now, and have scripts that I have collected from various places, as well as scripts that I have written for classes. It would be nice to be able to find scripts that others have written, as well as scripts I have written, all in one place. I don't think this needs to wait for source code license issues to be worked out. The /usr/demo/dtrace directory is a nice start. Possibly a /usr/demo/dtrace/contrib directory? As long as I'm at it, how about a /usr/demo/mdb/contrib directory with community contributed dcmds and walkers? max From jamesd.wi at gmail.com Tue Dec 21 10:41:22 2004 From: jamesd.wi at gmail.com (James Dickens) Date: Tue, 21 Dec 2004 12:41:22 -0600 Subject: [DTrace] dtrace script request In-Reply-To: <54533.68.185.88.229.1103650420.squirrel@www-yellow.garlic.com> References: <35935.68.185.88.229.1102475789.squirrel@www-yellow.garlic.com> <200412080659.iB86xiNv493774@zion.eng.sun.com> <54533.68.185.88.229.1103650420.squirrel@www-yellow.garlic.com> Message-ID: can you find a place to host what you have and others have for this list? i can find space on a web account i have, but that will only be for this list, sorry i know the server and pipeline wont survive the slashdotting it will see when opensolaris goes public or if it is made public. after we have it combined, we can maybe get sun.com to take over and make some web space availble for them all. james On Tue, 21 Dec 2004 09:33:40 -0800 (PST), Max Bruning wrote: > > Hi All, > > I don't know if this is the appropriate list, but I would like to see a > repository or contributor's directory of dtrace scripts. I have been > teaching > dtrace in classes for over a year now, and have scripts that I have > collected from various places, as well as scripts that I have written for > classes. > It would be nice to be able to find scripts that others have written, as > well as > scripts I have written, all in one place. I don't think this needs to > wait for > source code license issues to be worked out. > > The /usr/demo/dtrace directory is a nice start. Possibly a > /usr/demo/dtrace/contrib > directory? As long as I'm at it, how about a /usr/demo/mdb/contrib > directory > with community contributed dcmds and walkers? > > max > > _______________________________________________ > DTrace mailing list > DTrace at opensolaris.org > https://www.opensolaris.org/mailman/listinfo/dtrace > From thomas.nau at kiz.uni-ulm.de Tue Dec 21 11:35:05 2004 From: thomas.nau at kiz.uni-ulm.de (Thomas Nau) Date: Tue, 21 Dec 2004 20:35:05 +0100 (MET) Subject: [DTrace] dtrace script request In-Reply-To: References: <35935.68.185.88.229.1102475789.squirrel@www-yellow.garlic.com> <200412080659.iB86xiNv493774@zion.eng.sun.com> <54533.68.185.88.229.1103650420.squirrel@www-yellow.garlic.com> Message-ID: On Tue, 21 Dec 2004, James Dickens wrote: > can you find a place to host what you have and others have for this > list? i can find space on a web account i have, but that will only be > for this list, sorry i know the server and pipeline wont survive the > slashdotting it will see when opensolaris goes public or if it is > made public. We can provide space (of course on a s10 box ;-) and nice fat pipes to the Internet for Dtrace scripts or other goodies. What else would be needed? Thomas > > after we have it combined, we can maybe get sun.com to take over and > make some web space availble for them all. > > james > > > > On Tue, 21 Dec 2004 09:33:40 -0800 (PST), Max Bruning > wrote: >> >> Hi All, >> >> I don't know if this is the appropriate list, but I would like to see a >> repository or contributor's directory of dtrace scripts. I have been >> teaching >> dtrace in classes for over a year now, and have scripts that I have >> collected from various places, as well as scripts that I have written for >> classes. >> It would be nice to be able to find scripts that others have written, as >> well as >> scripts I have written, all in one place. I don't think this needs to >> wait for >> source code license issues to be worked out. >> >> The /usr/demo/dtrace directory is a nice start. Possibly a >> /usr/demo/dtrace/contrib >> directory? As long as I'm at it, how about a /usr/demo/mdb/contrib >> directory >> with community contributed dcmds and walkers? >> >> max >> >> _______________________________________________ >> DTrace mailing list >> DTrace at opensolaris.org >> https://www.opensolaris.org/mailman/listinfo/dtrace >> > _______________________________________________ > DTrace mailing list > DTrace at opensolaris.org > https://www.opensolaris.org/mailman/listinfo/dtrace > > > ----------------------------------------------------------------- PGP fingerprint: B1 EE D2 39 2C 82 26 DA A5 4D E0 50 35 75 9E ED Phone: +49 731 50 22464 FAX: +49 731 50 22471 From max at bruningsystems.com Tue Dec 21 12:04:34 2004 From: max at bruningsystems.com (Max Bruning) Date: Tue, 21 Dec 2004 12:04:34 -0800 (PST) Subject: [DTrace] dtrace script request In-Reply-To: References: <35935.68.185.88.229.1102475789.squirrel@www-yellow.garlic.com><200412080659.iB86xiNv493774@zion.eng.sun.com><54533.68.185.88.229.1103650420.squirrel@www-yellow.garlic.com> Message-ID: <55098.68.185.88.229.1103659474.squirrel@www-yellow.garlic.com> Hosting is not an issue. I can do hosting if needed. Rather, I would like this to be in one easy to find place. Preferably a sun site or even better, with the system (/usr/demo/dtrace/contrib). Perhaps sunfreeware.com (is Steven Christensen on this mail list)??? I find it easiest to learn (and teach) dtrace by looking at and hacking existing scripts. When I need a detail, I can look it up in the 400+ page dtrace guide. max > On Tue, 21 Dec 2004, James Dickens wrote: > >> can you find a place to host what you have and others have for this >> list? i can find space on a web account i have, but that will only be >> for this list, sorry i know the server and pipeline wont survive the >> slashdotting it will see when opensolaris goes public or if it is >> made public. > > We can provide space (of course on a s10 box ;-) and nice fat pipes to the > Internet for Dtrace scripts or other goodies. What else would be needed? > > Thomas > > >> >> after we have it combined, we can maybe get sun.com to take over and >> make some web space availble for them all. >> >> james >> >> >> >> On Tue, 21 Dec 2004 09:33:40 -0800 (PST), Max Bruning >> wrote: >>> >>> Hi All, >>> >>> I don't know if this is the appropriate list, but I would like to see a >>> repository or contributor's directory of dtrace scripts. I have been >>> teaching >>> dtrace in classes for over a year now, and have scripts that I have >>> collected from various places, as well as scripts that I have written >>> for >>> classes. >>> It would be nice to be able to find scripts that others have written, >>> as >>> well as >>> scripts I have written, all in one place. I don't think this needs to >>> wait for >>> source code license issues to be worked out. >>> >>> The /usr/demo/dtrace directory is a nice start. Possibly a >>> /usr/demo/dtrace/contrib >>> directory? As long as I'm at it, how about a /usr/demo/mdb/contrib >>> directory >>> with community contributed dcmds and walkers? >>> >>> max >>> >>> _______________________________________________ >>> DTrace mailing list >>> DTrace at opensolaris.org >>> https://www.opensolaris.org/mailman/listinfo/dtrace >>> >> _______________________________________________ >> DTrace mailing list >> DTrace at opensolaris.org >> https://www.opensolaris.org/mailman/listinfo/dtrace >> >> >> > > ----------------------------------------------------------------- > PGP fingerprint: B1 EE D2 39 2C 82 26 DA A5 4D E0 50 35 75 9E ED > Phone: +49 731 50 22464 > FAX: +49 731 50 22471 > From thomas.nau at kiz.uni-ulm.de Tue Dec 21 12:15:10 2004 From: thomas.nau at kiz.uni-ulm.de (Thomas Nau) Date: Tue, 21 Dec 2004 21:15:10 +0100 (CET) Subject: [DTrace] dtrace script request In-Reply-To: <55098.68.185.88.229.1103659474.squirrel@www-yellow.garlic.com> References: <35935.68.185.88.229.1102475789.squirrel@www-yellow.garlic.com><200412080659.iB86xiNv493774@zion.eng.sun.com><54533.68.185.88.229.1103650420.squirrel@www-yellow.garlic.com> <55098.68.185.88.229.1103659474.squirrel@www-yellow.garlic.com> Message-ID: <20041221211504.X663@alderaan.home.uni-ulm.de> > Hosting is not an issue. I can do hosting if needed. Rather, I would > like this > to be in one easy to find place. Preferably a sun site or even better, > with the system (/usr/demo/dtrace/contrib). Perhaps sunfreeware.com > (is Steven Christensen on this mail list)??? ... Agreed. Bigadmin would be my preferred option. Maybe a dtrace collection? Thomas ----------------------------------------------------------------- PGP fingerprint: B1 EE D2 39 2C 82 26 DA A5 4D E0 50 35 75 9E ED From steve at smc.vnet.net Tue Dec 21 12:32:58 2004 From: steve at smc.vnet.net (Steven M. Christensen) Date: Tue, 21 Dec 2004 15:32:58 -0500 (EST) Subject: [DTrace] dtrace script request Message-ID: <200412212032.PAA25992@smc.vnet.net> Yes, I am on this list and happy to offer space for dtrace downloads. Everything I put on the site is mirrored to currently 70 mirror sites. I presume this would be OK. Steve C. > > > Hosting is not an issue. I can do hosting if needed. Rather, I would > like this > to be in one easy to find place. Preferably a sun site or even better, > with the system (/usr/demo/dtrace/contrib). Perhaps sunfreeware.com > (is Steven Christensen on this mail list)??? > > I find it easiest to learn (and teach) dtrace by looking at and hacking > existing scripts. When I need a detail, I can look it up in the 400+ page > dtrace guide. > > max > > > On Tue, 21 Dec 2004, James Dickens wrote: > > > >> can you find a place to host what you have and others have for this > >> list? i can find space on a web account i have, but that will only be > >> for this list, sorry i know the server and pipeline wont survive the > >> slashdotting it will see when opensolaris goes public or if it is > >> made public. > > > > We can provide space (of course on a s10 box ;-) and nice fat pipes to the > > Internet for Dtrace scripts or other goodies. What else would be needed? > > > > Thomas > > > > > >> > >> after we have it combined, we can maybe get sun.com to take over and > >> make some web space availble for them all. > >> > >> james > >> > >> > >> > >> On Tue, 21 Dec 2004 09:33:40 -0800 (PST), Max Bruning > >> wrote: > >>> > >>> Hi All, > >>> > >>> I don't know if this is the appropriate list, but I would like to see a > >>> repository or contributor's directory of dtrace scripts. I have been > >>> teaching > >>> dtrace in classes for over a year now, and have scripts that I have > >>> collected from various places, as well as scripts that I have written > >>> for > >>> classes. > >>> It would be nice to be able to find scripts that others have written, > >>> as > >>> well as > >>> scripts I have written, all in one place. I don't think this needs to > >>> wait for > >>> source code license issues to be worked out. > >>> > >>> The /usr/demo/dtrace directory is a nice start. Possibly a > >>> /usr/demo/dtrace/contrib > >>> directory? As long as I'm at it, how about a /usr/demo/mdb/contrib > >>> directory > >>> with community contributed dcmds and walkers? > >>> > >>> max > >>> > >>> _______________________________________________ > >>> DTrace mailing list > >>> DTrace at opensolaris.org > >>> https://www.opensolaris.org/mailman/listinfo/dtrace > >>> > >> _______________________________________________ > >> DTrace mailing list > >> DTrace at opensolaris.org > >> https://www.opensolaris.org/mailman/listinfo/dtrace > >> > >> > >> > > > > ----------------------------------------------------------------- > > PGP fingerprint: B1 EE D2 39 2C 82 26 DA A5 4D E0 50 35 75 9E ED > > Phone: +49 731 50 22464 > > FAX: +49 731 50 22471 > > > _______________________________________________ > DTrace mailing list > DTrace at opensolaris.org > https://www.opensolaris.org/mailman/listinfo/dtrace > From max at bruningsystems.com Tue Dec 28 17:41:30 2004 From: max at bruningsystems.com (Max Bruning) Date: Tue, 28 Dec 2004 17:41:30 -0800 Subject: [DTrace] using C preprocessor in dtrace scripts Message-ID: <1104284490.717.9.camel@maxpc> Hi. I am trying to use the -C option to include a file so I can use #define's in the file. This is part of a larger script: ------------------------------------------------------- #!/usr/sbin/dtrace -Cs #include strrput:entry / args[0]->q_stream->sd_vnode == (struct vnode *)$1 && args[1]->b_datap->db_type == M_DATA / { printf("strrput mp = %p\n", args[1]); printf("mp->b_rptr = %*.*s\n", args[1]->b_wptr-args[1]->b_rptr, args[1]->b_wptr-args[1]->b_rptr, stringof(args[1]->b_rptr)); } ----------------------------------------------------- At any rate, without the -C, I can't use #include . Without the #include , I can't use the M_DATA. As it is, I get the following: # ./strrput.d 0xd595a6c0 <-- this is a vnode for a socket ftp is using (not important here) dtrace: failed to compile script ./strrput.d: line 7: sd_vnode is not a member of struct stdata # sd_vnode is definitely a member, so I tried using #define _KERNEL in the script, and then I get an error: dtrace: failed to compile script ./strrput.d: "/usr/include/sys/kstat.h", line 439: invalid type combination Anyone have any luck with using the preprocessor? thanks, max