1.4.1 Using Automatically Loaded DTrace Modules

Note

The following is a quick-start method for using DTrace kernel modules that are automatically loaded. If you plan to manually load DTrace kernel modules, see Section 1.4.2, “Manually Loading DTrace Modules” for instructions.

DTrace automatically loads some dtrace kernel modules when the dtrace command references the probes that are associated with a dtrace kernel module. You can use this convenient method to load dtrace modules, rather than manually loading them.

To find out which modules are automatically loaded in this manner, use the following command:

# cat /etc/dtrace-modules
sdt
systrace
profile
fasttrap

Additional modules can be added to this list after it is determined that they are fully tested.

To determine whether a particular module has been loaded in the Linux kernel, use the lsmod command. For example, you would run the following command to determine whether the sdt module is loaded:

# lsmod | grep sdt

If the module is not loaded, the command most likely will result in no output. If the module is loaded, the output is similar to the following:

sdt                    20480   0
dtrace                 151552  4 sdt,fasttrap,systrace,profile