Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Exploring OS X with dtrace' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Exploring OS X with dtrace
Authored by: bldantes on Jan 21, '08 08:43:21AM

Well, one used to be able to run ktrace/kdump to analyze one's own processes. But all of these dtrace tools appear to require superuser privileges -- which is incredibly annoying and even prohibitive in some situations. For the dtruss script in particular, does anyone know of a way to run this as a normal user?

The man pages mention something about setting the dtrace_kernel, dtrace_user or dtrace_proc privileges. But I can find no mention of how to set such beasts. Sun's pages (the origin of dtrace) mention the ppriv and usermod commands -- but those don't appear to be around.

What happened to deprecating a command over one major release before removing it? Thanks a lot, Apple.



[ Reply to This | # ]
10.5: Exploring OS X with dtrace
Authored by: mackyle on Apr 12, '08 11:38:48AM
For the dtruss script in particular, does anyone know of a way to run this as a normal user?
sudo chmod u+s /usr/sbin/dtrace

will allow dtruss to work as an ordinary user. It also makes dtrace suid root which means any user on the system can run dtrace with full privileges.

[ Reply to This | # ]