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."

12 of 128 comments (clear)

  1. 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

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

    ... sorry. :-P

  3. 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.
  4. 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?
  5. 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.
  6. 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.

  7. 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
  8. 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

  9. 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 ;)

  10. 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");
    }

  11. 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.

  12. 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.