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. 

Comments:

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 26, 2008 at 11:19 PM 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 10:02 AM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
21
22
23
24
25
26
27
28
29
30
   
       
Today