Re:Strace - The Sysadmin's Microscope
by onedognight on Thursday January 05, 2012 @06:31PM
(#3431125)
Does anyone know of a usable (no sudo needed) strace for Darwin / OS X?
[ Parent
| on HN ]
With dtrace you don't run your program as root. Dtrace runs as root. It isn't a launcher like strace.
Re:Strace - The Sysadmin's Microscope
by onedognight on Saturday January 07, 2012 @12:35AM
(#3436293)
I'm referring to dtruss which is a launcher like strace and is built on dtrace. The dtruss "interface" predates dtrace, but historically didn't need to be run a root.
This has bugged me for quite a while, a few days ago enough so that I actually grabbed the strace source code with the intent of compiling it on OSX, at which point I discovered the real reason: ptrace on OSX doesn't support the PTRACE_SYSCALL flag. (I gave up at that point.)
This is a tangent but why is sudo needed != usable?
Re:Strace - The Sysadmin's Microscope
by onedognight on Thursday January 05, 2012 @07:48PM
(#3431380)
I cannot think of a single time when I'm debugging an errant program when I would like to have it run as root. I can however think of many things, like debugging permission issues, resource limit issues, reading and writing files, etc where it makes a big difference to run as root. I know you can su and then su back to yourself, but that's a pain and things aren't exactly the same anymore, i.e. there is a usability problem.
Your can send your complaints to Apple and hope that they fix it, or use free software that doesn't do stupid things like this. IMO, you kind of forfeited your right to complain when you started using non-free software.
Unfortunately, not all organizations give their users root access :-(
usualy yoh debug code with gdb Nd the like....dtrace is morevfor profiling the whole setup and figuring out where to optimize......plus you can, i believe, insrument your code with dtrace probes, even better. if a company wants their product optimized theyll have to provide the tools for it.