Question

As we know, the DTrace running on different OSs provides different built-in functions. For example, the older versions of Solaris do not have inet_ntop() available in DTrace.

So when I write a DTrace script running on a special OS, how can I know what built-in functions the DTrace provide in advance? Or only can through running the script and checking the DTrace's complaint?

Was it helpful?

Solution

The best solution is to refer to the DTrace documentation for the version of the OS in question. For Solaris, new DTrace features almost always appear only in major release or updates and the documentation is (or should be) updated at the same time. Thus, if you're running Solaris 11.1 then you should consult the "Oracle Solaris 11.1 Dynamic Tracing Guide".

Solaris's dtrace(1) has no "show me the currently supported actions" option but you could consider logging an RFE.

If you write a script that requires a specific version of the DTrace implementation then you can bind to it with an option or pragma. This mechanism should exist in other DTrace implementations but the meaning of any particular version number will be different for each fork. Thus, as always, it's best to rely on the documentation.

OTHER TIPS

If you wish to get the list of functions exposed by the various Dtrace modules, you can use dtrace -l

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top