Enabling Probes

You enable probes with the dtrace command by specifying the probes without the l option. Without further directions, DTrace performs the default action when the specified probe fires. The default probe action indicates only that the specified probe has fired and does not record any other data. The following code example enables every probe in the sd module.

Example 2.6. Enabling Probes by Module

# dtrace -m sd
CPU     ID                     FUNCTION:NAME
  0  17329           sd_media_watch_cb:entry
  0  17330          sd_media_watch_cb:return
  0  17167                      sdinfo:entry
  0  17168                     sdinfo:return
  0  17151                  sdstrategy:entry
  0  17152                 sdstrategy:return
  0  17661          ddi_xbuf_qstrategy:entry
  0  17662         ddi_xbuf_qstrategy:return
  0  17649                xbuf_iostart:entry
  0  17341            sd_xbuf_strategy:entry
  0  17385                sd_xbuf_init:entry
  0  17386               sd_xbuf_init:return
  0  17342           sd_xbuf_strategy:return
  0  17177     sd_mapblockaddr_iostart:entry
  0  17178    sd_mapblockaddr_iostart:return
  0  17179               sd_pm_iostart:entry
  0  17365                 sd_pm_entry:entry
  0  17366                sd_pm_entry:return
  0  17180              sd_pm_iostart:return
  0  17181             sd_core_iostart:entry
  0  17407         sd_add_buf_to_waitq:entry
...

The output in this example shows that the default action displays the CPU where the probe fired, the integer probe ID that is assigned by DTrace, the function where the probe fired, and the probe name.

Example 2.7. Enabling Probes by Provider

# dtrace -P syscall
dtrace: description 'syscall' matched 452 probes
CPU     ID                     FUNCTION:NAME
  0     99                      ioctl:return
  0     98                       ioctl:entry
  0     99                      ioctl:return
  0     98                       ioctl:entry
  0     99                      ioctl:return
  0    234                   sysconfig:entry
  0    235                  sysconfig:return
  0    234                   sysconfig:entry
  0    235                  sysconfig:return
  0    168                   sigaction:entry
  0    169                  sigaction:return
  0    168                   sigaction:entry
  0    169                  sigaction:return
  0     98                       ioctl:entry
  0     99                      ioctl:return
  0    234                   sysconfig:entry
  0    235                  sysconfig:return
  0     38                         brk:entry
  0     39                        brk:return
...

Example 2.8. Enabling Probes by Name

# dtrace -n zfod
dtrace: description 'zfod' matched 3 probes
CPU     ID                     FUNCTION:NAME
  0   4080                    anon_zero:zfod
  0   4080                    anon_zero:zfod
^C

Example 2.9. Enabling Probes by Fully Specified Name

# dtrace -n clock:entry
dtrace: description 'clock:entry' matched 1 probe
CPU     ID                     FUNCTION:NAME
  0   4198                       clock:entry
^C