12.2 Installing and Configuring DTrace

Note

The DTrace dtrace-utils package is available from ULN. Your system must be registered with ULN and be installed with or be updated to Oracle Linux 6 Update 4 or later.

To install and configure DTrace, perform the following steps:

  1. On ULN, subscribe your system to the following channels:

    • Oracle Linux 6 Latest (x86_64) (ol6_x86_64_latest).

    • Unbreakable Enterprise Kernel Release 3 (UEK R3) for Oracle Linux 6 (x86_64) - Latest (ol6_x86_64_UEKR3_latest) or Unbreakable Enterprise Kernel Release 4 (UEK R4) for Oracle Linux 6 (x86_64) (ol6_x86_64_UEKR4), according to whether you boot the system with UEK R3 or UEK R4.

      Note

      UEK R4 requires Oracle Linux 6 Update 7 or later.

    • Oracle Linux 6 Dtrace Userspace Tools (x86_64) - Latest (ol6_x86_64_Dtrace_userspace_latest) for UEK R3 or Oracle Linux 6 Dtrace Userspace Tools (x86_64) (ol6_x86_64_UEKR4_DTrace_userspace) for UEK R4, as appropriate.

    Note

    Make sure that your system is not subscribed to the following channels:

    • Latest Unbreakable Enterprise Kernel for Oracle Linux 6 (x86_64) (ol6_x86_64_UEK_latest).

    • Dtrace for Oracle Linux 6 (x86_64) - Latest (ol6_x86_64_Dtrace_latest).

    • Dtrace for Oracle Linux 6 (x86_64) - Beta release (ol6_x86_64_Dtrace_BETA).

    • Unbreakable Enterprise Kernel Release 3 (3.8 based) for Oracle Linux 6 (x86_64) - Beta release (ol6_x86_64_UEK_BETA).

    These channels are applicable to UEK R2, DTrace for UEK R2, the beta release of DTrace for UEK R2, and the beta release of UEK R3.

  2. If your system is not already running the latest version of UEK R3 or UEK R4:

    1. Use yum to update your system to use UEK R3 or UEK R4.

      # yum update
    2. Reboot the system, selecting the Oracle Linux Server (3.8.13 for UEK R3 or 4.1.12 for UEK R4, as appropriate) kernel in the GRUB menu if it is not the default kernel.

  3. Use yum to install the DTrace utilities package:

    # yum install dtrace-utils

If you subsequently use yum update to install a new kernel, yum does not automatically install the matching dtrace-modules package that the kernel requires. If the appropriate dtrace-modules package for the running kernel is not present on the system, the dtrace command downloads and installs the package from ULN. To invoke this action without performing a trace, use a command such as the following:

# dtrace -l

Alternatively, run the following command to install the DTrace module that is appropriate to the running kernel:

# yum install dtrace-modules-`uname -r`

If you want to implement a libdtrace consumer or develop a DTrace provider, use yum to install the dtrace-utils-devel or dtrace-modules-provider-headers package respectively.

To be able to trace user-space processes that are run by users other than root, change the mode of the DTrace helper device as described in Section 12.2.1, “Changing the Mode of the DTrace Helper Device”.

You can find files that contain the latest information about the implementation of DTrace in /usr/share/doc/dtrace-DTrace_version.