1.4.2.1 Example: Displaying Probes for a Provider

The following example shows how you would display the probes for a provider, such as proc, by using the dtrace command.

# dtrace -l -P proc
   ID   PROVIDER            MODULE                          FUNCTION NAME
  855       proc           vmlinux                          _do_fork lwp-create
  856       proc           vmlinux                          _do_fork create
  883       proc           vmlinux                           do_exit lwp-exit
  884       proc           vmlinux                           do_exit exit
  931       proc           vmlinux                   do_sigtimedwait signal-clear
  932       proc           vmlinux                     __send_signal signal-send
  933       proc           vmlinux                     __send_signal signal-discard
  941       proc           vmlinux                     send_sigqueue signal-send
  944       proc           vmlinux                        get_signal signal-handle
 1044       proc           vmlinux                     schedule_tail start
 1045       proc           vmlinux                     schedule_tail lwp-start
 1866       proc           vmlinux                do_execveat_common exec-failure
 1868       proc           vmlinux                do_execveat_common exec
 1870       proc           vmlinux                do_execveat_common exec-success

The output shows the numeric identifier of the probe, the name of the probe provider, the name of the probe module, the name of the function that contains the probe, and the name of the probe itself.

The full name of a probe is PROVIDER:MODULE:FUNCTION:NAME, for example, proc:vmlinux:_do_fork:create. If no ambiguity exists with other probes for the same provider, you can usually omit the MODULE and FUNCTION elements when specifying a probe. For example, you can refer to proc:vmlinux:_do_fork:create as proc::_do_fork:create or proc:::create. If several probes match your specified probe in a D program, the associated actions are performed for each probe.

These probes enable you to monitor how the system creates processes, executes programs, and handles signals.

If you checked previously and the sdt module was not loaded, check again to see if the dtrace command has loaded the module.

If the following message is displayed after running the dtrace -l -P proc command (instead of output similar to the output in the previous example), it is an indication that the module has not loaded:

No probe matches description

If the sdt module does not load automatically on a system with DTrace properly installed, it is because another DTrace module was manually loaded by using the modprobe command. Manually loading a DTrace module in this way effectively prevents any other modules from being automatically loaded by the dtrace command until the system is rebooted. In this instance, one workaround is to use the modprod command to manually load the sdt module. When the module has successfully loaded, you should see a probe listing similar to the output in Section 1.4.2.1, “Example: Displaying Probes for a Provider” when you re-issue the dtrace command.