Slashdot Mirror


DTrace Becomes Usable on FreeBSD

daria42 writes "A project to port Sun Microsystems' Dynamic Tracing (DTrace) tool to FreeBSD appears to have achieved some initial success. DTrace was open sourced last year and is one of the coolest features in Solaris 10."

30 of 128 comments (clear)

  1. Cool. by grub · · Score: 3, Funny


    Now we can have Netcraft confirmation of the death with a long DTrace log to back it up.

    --
    Trolling is a art,
    1. Re:Cool. by DAldredge · · Score: 2

      One can use DTrace in production under Solaris 10.

  2. DTrace scripts by Life700MB · · Score: 5, Informative


    Here you got some dtrace scripts, direct from my firefox bookmarks.


    --
    Superb hosting 20GB Storage, 1_TB_ bandwidth, ssh, $7.95

  3. STUB! by corychristison · · Score: 5, Funny
    This description is a stub. Please help extend it by contributing some real information!

    ... sorry. :-P

  4. I think the GPL weenies are jealous by Dopeskills · · Score: 2, Insightful

    Sorry, but DTrace is a really great feature regardless of what your political OSS views are. Porting it to BSD only makes it that much cooler.

    1. Re:I think the GPL weenies are jealous by Winter+Lightning · · Score: 4, Informative

      The whole point of DTrace is that it allows you to gather information
      that you couldn't obtain before. See some examples here:
        http://blogs.sun.com/roller/page/bmc/20040805
      here:
        http://users.tpg.com.au/adsln4yb/dtrace.html#OneLi ners
      and here:
        http://www.sun.com/software/solaris/howtoguides/dt racehowto.jsp

      Declaration of interest: I work for Sun, use DTrace, demonstrate it and
      see the expressions of stunned delight on the faces of people
      when they suddenly recognise its power.

  5. GPL != Open Source by nsayer · · Score: 5, Informative
    The GPL is not the only Open Source license. Dig your head out of the sand and see how may others there are.

    The CDDL under which the code in question was released is a slightly modified version of the Mozilla Public License. So if you used Mozilla or firefox or whatever to post that screed, then you've clearly sinned against the church of RMS.

    Oh, and the CDDL IS an OSI approved license, so that means DTrace IS (by the definition most programmers who don't wear Birkenstocks agree on) Open Source.

    As a developer, if you value your work, the GPL is the better license under which to release code, as it means no-one can take your work, close the source, and sell it as their own.

    CDDL Section 3.1:

    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.
    So try again.
    1. Re:GPL != Open Source by cortana · · Score: 2, Informative
      The CDDL under which the code in question was released is a slightly modified version of the Mozilla Public License. So if you used Mozilla or firefox or whatever to post that screed, then you've clearly sinned against the church of RMS.
      Nonsense; Mozilla is tri-licensed under the GPL, LGPL and MPL.
    2. Re:GPL != Open Source by at_slashdot · · Score: 2, Informative

      Directly from the Church of RMS (http://www.gnu.org/philosophy/license-list.html ):
      ------
      This is a free software license which is not a strong copyleft; it has some complex restrictions that make it incompatible with the GNU GPL. It requires that all attribution notices be maintained, while the GPL only requires certain types of notices. Also, it terminates in retaliation for certain aggressive uses of patents. So, a module covered by the GPL and a module covered by the CDDL cannot legally be linked together. We urge you not to use the CDDL for this reason.

      Also unfortunate in the CDDL is its use of the term "intellectual property".
      ---------
      Also (http://www.eweek.com/article2/0,1895,1754155,00.a sp): "according to Mark Webbink, Red Hat Inc.'s associate general counsel. "Some of the license attributes that Sun trumpets actually have the potential of making the software not fully open," he said. "For example, by permitting a different license for the binaries, it will be possible for the binaries to have all of the attributes of proprietary code."

      --
      "It is our choices, Harry, that show what we truly are, far more than our abilities." -- Prof. Dumbledore
    3. Re:GPL != Open Source by eviltypeguy · · Score: 2, Informative

      CDDL was very carefully written so as to prevent their code to be migrated to GPLed software. Sun is deathly afraid that their software will fork under a GPL license and that they won't be able to keep up with the GPLed coders.

      Stop spreading FUD. Anyone involved in the pilot process for OpenSolaris can tell you that those are NOT the reasons why the CDDL was created or used for SUN's code. The GPL was also one of the licenses considered.

      Personally, I think the GPL is very selfish. GPL projects can take all the BSD code or code from other compatibly licensed files they want, incorporate and improve it but the GPL prevents BSD developers from getting back most of those improvements unless the project incorprating gives them back under the original license (so it would seem anyway, someone correct me if wrong and explain).

  6. Re:NOT Open Source (was: GPL) by antik2001 · · Score: 3, Interesting

    All the code Apple borrowed from BSDs and changed is contributed back with DarWin OS. It is also the core set of components upon which Mac OS X was developed. In July 2003 Apple released Darwin under version 2.0 of the APSL license, which the Free Software Foundation (FSF) approved as a free software license. Previous releases had taken place under an earlier version of the APSL that did not meet the FSF's definition of free software, although it met the requirements of the Open Source Definition.

  7. Re:NOT Open Source (was: GPL) by mwvdlee · · Score: 4, Insightful

    Linux already uses BSD code, so why wouldn't they want to use some more?

    I develop under both GPL and BSD licenses, based on the particular piece of code. If I think the code has strategic value (typically a library or framework), I'll develop under BSD so I can use it in any of my closed-source software too. Software which only has utilitarian value is typically released under GPL.

    GPL is of good use to a lot of projects, but IMHO it's a terrible license for frameworks and libraries. The LGPL does improve the situation for libraries somewhat, but it's won't work for all situations. That's why many "standard" libraries use more open licenses than (L)GPL; if you're not allowed to use the canonical library in all situations, it's not a useable standard.

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  8. Re:NOT Open Source (was: GPL) by QuietLagoon · · Score: 2, Insightful
    As a developer, if you value your work, the GPL is the better license under which to release code

    Isn't it up to each individual developer to decide what license to use for their original code? Isn't that what choice is all about? If I choose not to use one license or another for my code, why should you care? It is, after all, my code.

  9. Re:NOT Open Source (was: GPL) by DrSkwid · · Score: 2, Funny

    you missed the caveat : IMPROVED

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  10. Re:NOT Open Source (was: GPL) by Eivind+Eklund · · Score: 4, Insightful
    So, let me get this right, in your world you get ZERO value from utilization of code, and you get ZERO value from having people contribute changes back, ALL your value is from "not getting ripped off"?

    That's one hell of an emotional world.

    I'm glad I don't live in that world, and can be a FreeBSD developer instead ;)

    Eivind, who recognize that when people develop things based on his code, he's got a chance of getting things back, and when they choose another codebase because his is GPL-licensed, he has ZERO chance of getting anything back.

    --
    Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  11. Re:NOT Open Source (was: GPL) by foreverdisillusioned · · Score: 4, Insightful

    In a word, yes. You just need to replace "ClosedBSD" with "OS X."

    Fortunately, Apple was kind enough to open source Darwin, but it didn't need to, and it choose not to open source the Aqua UI and the Finder shell. I could be mistaken, but I don't think they would have been able to do this had Darwin been based on GPL'ed software.

    A better example of the GPL's strength would be the Linksys WRT54G router. I've got one myself and it does all kinds of awesome things it wasn't able to do out of the box (hell, you can even run an OpenVPN server on it), all because Linksys was forced to release their source code under the GPL.

    That said, the BSDs are great projects (as are public domain projects like SQLite) and I wouldn't want to see them disappear. I believe that the core focus of the OSS community should be on GPL'ed software (because "embrace and extend" does in fact happen), but there's definitely an argument and a place for BSD-style licenses.

  12. Re:Dtrace - is often referred to as "error vomit" by asaul · · Score: 5, Informative

    Dtrace is the exact opposite of error vomit, and I dont recall ever hearing it called that anyway. The entire principle is that you dont need to go inserting metric shitloads of debugging and printf("we got here") statements all through your code, recompile it and then see that the error doesnt occur because all your debugging has now slowed your code enough to prevent the race condition that caused the original error.

    True - its a L3 and developer tool for the most part, but there are plenty of scripts out there to show what it can do for an admin. Take a look at http://users.tpg.com.au/adsln4yb/dtrace.html for starters. Stuff like iosnoop, iotop, opensnoop and kill.d can be used quite regularly by admins without the need for putting debugging into active applications.

    --
    "If everybody is thinking alike, somebody isn't thinking" - Gen. George S. Patton
  13. Re:NOT Open Source (was: GPL) by LarsWestergren · · Score: 4, Interesting

    I dont think DTrace on FreeBSD is going to sway over and change the mind of those who use and pay and contribute to the GPL. From a strategy point of view it just made BSD's that much more competitive with Solaris and Sun offers. With the GPL you at least get some improvemnts back if your contribution is of value and nobody can close its acess.

    Well, or GPL people could take the fine contribution of the BSD people, and port it to GPL. Therefore both communities can benefit. If Sun had released it under GPL, the BSD people would have been prevented from doing this. At least that is my understanding. So in this case the BSD licence seemed like a good choice, the one that maximises freedom for developers.

    Furthermore, I believe Sun has stated that they would be happy if DTrace was ported to Linux, and though they can't pay developers to do it, they can provide other help (perhaps like the testsuites).

    Again I'm baffled by the level of hostility towards Sun on Slashdot. Here they open source an amazing tool, and help us port it, and they get a lot of nasty comments for it.

    --

    Being bitter is drinking poison and hoping someone else will die

  14. Not ready for -CURRENT? by Anonymous Coward · · Score: 4, Informative

    Dtrace is one of the best Unix development tools around, no joke. However the project is nowhere near available for FreeBSD users....

    From Bryan Cantrill's blog: "If you run FreeBSD in production, you're going to want John's port as it stands today -- and if you develop for the FreeBSD kernel (drivers or otherwise), you're going to need it."

    Now compare this to Birrell's announcement: "There is still a lot of work to do and while that goes on, the code has to remain in the FreeBSD perforce server. It isn't ready to get merged into CVS-current yet."

    Great news and nicely done... but, um, come back when it's ready for -CURRENT primetime before telling Zdnet it's ready ;)

  15. Maybe you should wipe your mouth after vomiting by gd23ka · · Score: 4, Insightful

    Last week I had a major problem trying to get Linux nfs4 clients to mount from Solaris 10 servers. Even though on the Linux client the domain uid mapping superficially worked (I saw the correct user/groups displayed) the NFSv4 Server Kernel Module was still using LINUX uid/gid combinations supplied by the linux client to go to the filesystem driver with to ask for permission.

    You, sir, obviously don't have the slightest clue what you're talking about.

    Here's my script, btw

    #!/usr/sbin/dtrace -Cs

    #define ACCESS4_READ 1
    #define ACCESS4_LOOKUP 2
    #define ACCESS4_MODIFY 4
    #define ACCESS4_EXTEND 8
    #define ACCESS4_DELETE 16
    #define ACCESS4_EXECUTE 32

    fbt:nfssrv:rfs4_op_access:entry {
            requested_access = ((struct ACCESS4args *) arg0)->access;
            cs = (struct compound_state *) arg3;
            cr = (struct cred *) cs->cr;
            printf ("uid = %d gid = %d\n", cr->cr_uid, cr->cr_gid);
            printf ("ACCESS4_READ = %s\n", requested_access & ACCESS4_READ ? "yes" : "no");
            printf ("ACCESS4_LOOKUP = %s\n", requested_access & ACCESS4_LOOKUP ? "yes" : "no");
            printf ("ACCESS4_MODIFY = %s\n", requested_access & ACCESS4_MODIFY ? "yes" : "no");
            printf ("ACCESS4_EXTEND = %s\n", requested_access & ACCESS4_EXTEND ? "yes" : "no");
            printf ("ACCESS4_DELETE = %s\n", requested_access & ACCESS4_DELETE ? "yes" : "no");
            printf ("ACCESS4_EXECUTE = %s\n", requested_access & ACCESS4_EXECUTE ? "yes" : "no");
    }

  16. Re:NOT Open Source (was: GPL) by SillyNickName4me · · Score: 5, Insightful

    From a strategy point of view it just made BSD's that much more competitive with Solaris and Sun offers.

    Now, last time I checked, Sun regards Redhat as one of its main competitors for 'enterprise unix' systems. So, since you are saying is that due to dtrace, FreeBSD became more competitive with Solaris, doesn't that mean it became that much more competitive with at least Redhat Linux?

    With the GPL you at least get some improvemnts back if your contribution is of value and nobody can close its acess.

    What the fuck does this have to do with anything? Ah, I see, you were just looking for a reason to do some 'GPL advocacy'.. Let me make some small suggestion: Advocacy like this is just annoying the hell out of people, and makes you look like a fanatic idiot.

    Not to mention that the fud you are spreading is just that, fud. Nobody can close access to existing BSD licenced code EVER, got that? (and yes, people can derive from a BSD licenced work, and keep their source changes private while distributing the binaries. If people want to do that with GPLed code, they cannot distribute, or have to obtain an alternative licence from the authors, see the Trolltech business model)

    As a developer, if you value your work, the GPL is the better license under which to release code, as it means no-one can take your work, close the source, and sell it as their own.

    Now, the modern BSD licence only contains 2 clauses, is really easy to read, and yet you fail to understand it. You think anyone should take your advice?

    You can NOT take a BSD licenced work and claim it as your own, that is basicly the one and only thing that licence prevents you from doing. All you can do which you cannot do with the GPL is keep changes to the source private while distributing the binary result. You may believe that is bad, and you are entitled to your own beliefs there. I happen to believe otherwise, and with me, there seem thousands of people who believe otherwise, but again, that is a matter of opinion, and not a matter of fact.

    It means every change is visible to you,

    No, it does not. It only guarantees that if you get back a binary of some derived program, that you also have a right on getting the source with the changes. You have no right to see anyones changes if they decide to not distribute the result but use it for their own internal work for example.

    and that you are free to incorporate the changes other people have made to your product back into it, or into other projects you are working on.

    Not if you are for example called Trolltech (qt), Sun (OpenOffice) or anyone else who deals with dual licencing, but generally that is the idea of the GPL indeed. It is a good argument for it, despite it not always working out.

    This encourages collaboration, and thus helps the advancement of software engineering.

    The fact that all TCP/IP (ip4) implementations are mostly compatible, that most of the basic protocols used on it are compatible between vendors and such are pretty much because there is good and for any purpose usable BSD code around to implement those things, which was either used directly or used as a reference implementation to test against.

    This single tiny detail makes that there is actually some choice instead of having ended up with a proprietary network owned by either aol, microsoft, ibm or some other big entity.

    I leave it to your imagination what this means for software development.

    I will give you one more suggestion, learn to appreciate someone elses work, esp. when that work is pretty good and they actually insist on publishing that work such that everyone can use it. If you just feel that instead of appreciating such things, you must use the occation to spread lies and fud then I call you a moron.

  17. Re:NOT Open Source (was: GPL) by DrSkwid · · Score: 2, Insightful

    hmm, did you reply to the wrong post ?

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  18. Re:NOT Open Source (was: GPL) by trifish · · Score: 3, Informative

    > It means every change is visible to you,

    That's not always true. If you modify a GPL-ed web application (or server software) and don't distribute it (only run it for / show output to your visitors) -- the you don't have to publish (open source) the modifications.

  19. Re:NOT Open Source (was: GPL) by trip23 · · Score: 2, Insightful
    That makes no sense at all. Of course you can license your code to others under the GPL and still use it in your own proprietary products. You're not limited by the terms under which you license your code to others. That's like accusing Microsoft of hypocrisy for mass-duplicating their own software while also pressing piracy charges.
    The point is that if others contributed to your GPL'ed code, you have to get their permission to use the code in a closed-source environment. With a BSD license you don't have to worry about this. With the GPL it's hard to change the license, if there are a lot of contributors. Just take a look at the discussion about the Linux Kernel und GPL 3.0. Getting the consent of all copyright-holders in order to upgrade to 3.0 would be a nightmare.
  20. Highly desirable toolkit, but not universal. by Anonymous Coward · · Score: 3, Interesting

    I saw Bryan Cantrill give a demo of DTrace at my university. I was pretty impressed.

    I wanted to use it for my application to diagnose performance and race condition problems. However, then I realized I'd have to wrap all the instrumentation so that it would still work portably. Then I thought it seemed like an awful lot of bother just to get some profiling in there, especially if I was going to support an alternate method of collecting the same events so as to make the whole application (which includes profiling support) portable.

    "Sorry, we have to run it on Solaris or FreeBSD to debug/optimize" was ultimately what made me stay away from it. I looked into getting OpenSolaris working, and by the time I'd finally finally discovered from Sun's extremely confusing website and the equally confusing OpenSolaris webpages that what I wanted was Solaris Express:Community Release (SX:CR) so that I could get some interesting DTrace fixes and features, and had even burnt the 4 CDs and was all ready to commit to the Solaris way of life, I just got the heebie jeebies.

    Hopefully, just hopefully, the FreeBSD port works out well, and there will be a version for Linux sometime soon... there's hope that the advent of the GPLv3 will ease a lot of political slash licensing problems.

    DTrace is really incredible for application developers. You can insert lightweight, shippable, debugging and profiling points wherever you want them. I just feel you can't outright commit your project to it yet which is sad. It's the kind of stuff that should be made a POSIX standard, quite frankly.

  21. Here. Use one of my napkins then. by gd23ka · · Score: 3, Informative

    Hi there, first I don't give a flying fsck whether i get l33t points over this or really whether I get modded down.
    I hope however that either of our posts get modded up so that people actually take notice of this thread.

    That out of the way I don't really care whether droves of Linux/FreeBSD/OpenBSD etc.etc. users rush and adopt
    (Open)Solaris. I would definitely switch to Solaris also at home instead of Linux if it supported all of my hardware
    but I guess the home-user is besides the point I suppose you trying to make. Suffice it to say I can see no rush to
    AIX on the pseries or to HP-UX either but that has more to do with market saturation than anything else.
    The more interesting statistic to look into is how many Solaris 2.5-9 users have upgraded to Solaris 10. We admittedly
    didn't get all excited about DTrace alone, actually it was Solaris Zones that pulled us in.
    Oh I forgot. Microsoft Windows. Either risking to come off arrogant or preaching to the choir here, I suppose people
    using that can't be expected to migrate to Solaris either, mainly because of their investment in "Microsoft Technologies" but also from my personal experience due to an (utter) lack of broad technical background on behalf of their staff.
    These people for the most part don't trace first and see if they can tackle the problem. They consult "Knowledgebases" or call Microsoft.

    So the question is, what rush are you expecting that nobody else is (well apart from the marketing/sales depts trying
    to justify their upkeep) ??

    2. Is it definitely going to work wonders for BSD. It made my life on Solaris a hell of a lot easier. It'll make
    people's lives on (Free)BSD a hell of a lot easier. Soon I'm sure it will do that on Linux and after that on AIX,
    HP-UX oh and maybe in a few years hence even on more esoteric systems like Stratus VOS etc.

    As an administrator it does wonders for me over and over, because now I can trace SCSI cmds/responses from devices,
    trace NFS problems like the one I just bragged about and the like. I get so much faster and easier clued in where
    the problem is by looking at what's going on under the hood so yes it is making me vastly more productive as an admin.

    3. DTrace is also useful for "regular IT folks" and I guess that's where our real mentality problem kicks in. Firstly,
    even you who is definitely not an engineer can use DTRACE scripts other people develop. It's easy, at times all you
    need to do is dtrace -s script.d and there you are. But going back to our mentality problem. You're right. I think
    DTRACE is not really made for "regular IT folks" that are not fluent in C or don't have a working knowledge of processes/threads/user virtual address space vs. kernel address space etc. etc. I guess "regular IT folks" like that wont get much mileage out of DTRACE but still like I said they can use already developed scripts with maybe someone over the phone helping them. And that brings us to some Level 3 support guys @ SUN in Bulington... their main problem with DTRACE is not that it's of no help or no value. In fact our competition at one site opened a call with Sun on an issue we were already working on and then sent us a DTRACE script Sun support wanted to run. We compared it to our own script we had started on the problem and Sun support was looking exactly at the same cause of the problem we were :-). I guess the real
    issue some of the Level 3 Support guys @ SUN in Bulington have is that DTRACE gives third parties like us a hell of a lot more clout in diagnosing problems which results in a lot less calls to them and that's making them vomit.
    To tell you the truth I mulled this aspect of DTRACE over too, that it would give the customer and competitors more
    insight and transparency into the system, but like you said yourself DTRACE is nothing for "regular IT folks" so
    on the bottomline it's a definite plus for us.

  22. Re:NOT Open Source (was: GPL) by SillyNickName4me · · Score: 3, Insightful

    Fortunately, Apple was kind enough to open source Darwin, but it didn't need to,

    Not only that, they also contribute code back to FreeBSD, which they also don't have to. It is directly to their advantage to do this however (if it gets accepted it means it gets maintained without Apple having to pay developers to do so). Now, Apple isn't exactly alone in this either, considering things like FreeBSD's netgraph and jails just to name some other things contributed by conpanies who could also have decided to keep those things to themselves.

    and it choose not to open source the Aqua UI and the Finder shell. I could be mistaken, but I don't think they would have been able to do this had Darwin been based on GPL'ed software.

    You are wrong.

    Those are applications runniong on top of the core system, and they can be kept closed source just as much as you can have a closed source application for the GPLed Linux, and it is legal to create a CD that distributes both.

    For that matter, there exist closed source X implementations and desktops that run on Linux as well, giving you a near equivalent (as in, a gui 'engine' and a desktop environment, not judging that they are of eqivalent quality)

  23. systemtap works for me by j0el · · Score: 2, Informative
  24. real men don't use licenses ... by retiarius · · Score: 2, Funny

    ... they use the public domain. public domain is the stem cell
    of licensing, whereby you can take such code and graft any damnfool
    license onto it if you have the inexplicable urge to think smaller.

    oh, and real men don't use 'dtrace', they use 'printf()' --
    if it's good enough for ritchie & thompson, it's good enough for me!

  25. Re:NOT Open Source (was: GPL) by MichaelSmith · · Score: 2, Insightful
    why the BSD license usually is MORE efficient for getting changes back

    As far as I am aware, the BSD license was not designed with this goal in mind. The GPL was designed with the goal of keeping the source code available to the developer community.

    Whether this goal is achieved is debatable, but I think the GPL (or licenses similar to it) deliver the best chance of keeping systems open as we move into a heavily DRM'd world.