In order to use the tools in the C/C++ DTrace Extended profile configuration, the Solaris user account that you use when you run the IDE must have sufficient DTrace privileges to observe system behavior. The user account must have the trace_user, dtrace_proc, and dtrace_kernel privileges.
When you try to run the tools without sufficient privileges, a message about special access required is displayed along with a Repair button. You can click the Repair button and enter the password for a privileged account such as root. The IDE then temporarily grants the required privileges to your account. To avoid these messages, you can grant the DTrace privileges to your account permanently.
To check your DTrace privileges, type the following at the command prompt:
/bin/ppriv $$
If your account has the required privileges, the ppriv command should return something similar to:
E: basic,dtrace_kernel,dtrace_proc,dtrace_user I: basic,dtrace_kernel,dtrace_proc,dtrace_user P: basic,dtrace_kernel,dtrace_proc,dtrace_user L: all
The line that starts with "I:" is important because it specifies privileges that are inherited by programs started from your shell. If your account doesn't have the required inheritable privileges, and you do not have administrator privileges or root access to your system, you should ask your system administrator to add the dtrace_user, dtrace_proc, and dtrace_kernel inheritable privileges to your account.
If you have administrator privileges or root access to your system, you can grant your user account the required privileges as described below.
To permanently grant required DTrace privileges to a user account:
usermod -K defaultpriv=basic,dtrace_kernel,dtrace_user,dtrace_proc
usernameTo temporarily grant required DTrace privileges to a user account:
echo $$
ppriv -s I+dtrace_user,dtrace_proc,dtrace_kernel
process-ID
See also | |
---|---|
Managing C/C++/Fortran Profile Configurations Profiling C/C++/Fortran Projects C/C++/Fortran Project Properties Dialog Box: Profile |