Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: April 2019
 
 

Using DTrace in a Non-Global Zone

Perform the following steps to use DTrace functionality as described in Running DTrace in a Non-Global Zone.

How to Use DTrace in a Non-Global Zone

  1. Become a zone administrator.

    You must also be assigned the Network Management rights profile. The root role has all of these rights.

    For more information, see Assigning Limited Rights to Zone Administrators.

  2. Use the zonecfg limitpriv property to add the dtrace_proc and dtrace_user privileges.
    global$ zonecfg -z my-zone
    zonecfg:my-zone> set limitpriv="default,dtrace_proc,dtrace_user"
    zonecfg:my-zone> exit

    Note -  Depending on your requirements, you can add either privilege, or both privileges.
  3. Boot the zone.
    global$ zoneadm -z my-zone boot
  4. Log in to the zone.
    global$ zlogin my-zone
  5. Run the DTrace program.
    my-zone$ dtrace -l