DTrace Privileges
I wanted to learn more about DTrace, so I started at the beginning: Chapter 1 of the Solaris Dynamic Tracing Guide. Using my installation of OpenSolaris 2008.05, I typed in the first command described, but it did not work:
$ dtrace -n BEGIN dtrace: failed to initialize dtrace: DTrace requires additional privileges
This is because in order to use DTrace, my account needs additional privileges that were not specified when the account was created. The DTrace privileges are described in Chapter 35.
To add the necessary privileges to my account, I followed these instructions on the frequently helpful Solaris Internals performance wiki. After logging out and then logging back in, the dtrace command now works for my account.
Hi,
Have a look at the man page of `pfexec`.
[edward@opensolaris0805:~]> dtrace -n BEGIN
dtrace: failed to initialize dtrace: DTrace requires additional privileges
[edward@opensolaris0805:~]> pfexec dtrace -n BEGIN
dtrace: description 'BEGIN' matched 1 probe
CPU ID FUNCTION:NAME
0 1 :BEGIN
^C
[edward@opensolaris0805:~]> uname -sv
SunOS snv_95
[edward@opensolaris0805:~]> env | grep "SHELL"
SHELL=/bin/zsh
Thanks,
Edward.
Posted by EdwardOCallaghan on August 27, 2008 at 06:19 AM GMT #
Hi Edward - Yeah, I tried that approach, but I'm too lazy to always type in "pfexec" in front of "dtrace." :-)
Posted by Gregg Sporar on August 27, 2008 at 05:02 PM GMT #