1.4.2 Manually Loading DTrace Modules


The following information describes how to manually load DTrace kernel modules. If you plan to use DTrace kernel modules that are automatically loaded, you can skip this section of the tutorial. See Section 1.4.1, “Using Automatically Loaded DTrace Modules”.

To use DTrace providers, their supported kernel modules must be loaded each time the kernel is booted.

If the dtrace kernel module is not already loaded, when the dtrace command is run, the dtrace module and all of the modules that are listed in /etc/dtrace-modules are all loaded automatically. However, if the dtrace kernel module is already loaded, the automatic kernel module loading mechanism is not triggered.

You can load modules manually by using the modprobe command. For example, to use the fbt kernel module if it is not in the default list, you would run the following command:

# modprobe fbt

The modprobe action also loads the dtrace kernel module as a dependency so that a subsequent dtrace command does not drive automatic loading of other dtrace modules until the dtrace kernel module is no longer loaded. The drace kernel module will no longer be loaded upon another boot of the system or after the manual removal of the dtrace kernel modules.

The suggested practice is to use the dtrace -l command to trigger automatic module loading and thereby also confirm basic dtrace functionality. Then, use the modprobe command to load additional modules that are not in the default list, such as fbt, as needed.