tags:

views:

257

answers:

4

From what I can see, a DTrace implementation on Linux is held up by licensing and politics. What are the alternatives currently?

+4  A: 

Systemtap is designed to solve the same sort of problems as dtrace, and has a similar user interface – the user writes small scripts which attach actions to named probes.

It is said to be unstable, it's not usually compiled into your kernel by default, and but once it's working I didn't have any problems.

You can see how it compares to dtrace in this table on the systemtap website (May be partisan :-)

Dtrace has been partly ported to Linux by Paul Fox, an enthusiast, and is available for download for you to try - check out the links on his blog.

It has been said that kprobes are a dtrace replacement, but I've never tried them.

Alex Brown
I wasn't aware of that DTrace port, I'll check it out. Thanks.
Pascal Thivent
A: 

ltrace

Ignacio Vazquez-Abrams
+1  A: 

Linux has strace/ltrace (see this post about strace). But they aren't really equivalent to DTrace, they just cover a small part of what DTrace can do (actually, DTrace is vastly superior to anything Linux offers).

Pascal Thivent
+1  A: 

SystemTap is a higher level abstraction built on Kprobes. For more information about how Kprobes work, you can read my technical article on LWN.

As Alex mentioned, Systemtap is essentially solving the same problem as dtrace, except that it's somewhat slower (you may not perceive it to be so, depending upon what you're trying to do with it) than dtrace and not quite as polished or safe to use.

Sudhanshu