Ryan
2008-Nov-04 01:30 UTC
[dtrace-discuss] Passing arguments to program started by dtrace?
Hi all, I''m trying to run dtrace -c on a program that takes command-line arguments... is there any way to tell dtrace where its args let off and the target''s begin, or will I have to write a shell script that checks for ''--'' or some such? Thanks, Ryan -- This message posted from opensolaris.org
Mike Shapiro
2008-Nov-04 01:35 UTC
[dtrace-discuss] Passing arguments to program started by dtrace?
On Mon, Nov 03, 2008 at 05:30:49PM -0800, Ryan wrote:> Hi all, > > I''m trying to run dtrace -c on a program that takes command-line arguments... is there any way to tell dtrace where its args let off and the target''s begin, or will I have to write a shell script that checks for ''--'' or some such? > > Thanks, > RyanQuote them: # dtrace -c date -n syscall::write:entry''/pid == $target/{}'' dtrace: description ''syscall::write:entry'' matched 1 probe Mon Nov 3 17:35:09 PST 2008 dtrace: pid 22877 has exited CPU ID FUNCTION:NAME 2 96354 write:entry # dtrace -c ''date +%Y'' -n syscall::write:entry''/pid == $target/{}'' dtrace: description ''syscall::write:entry'' matched 1 probe 2008 dtrace: pid 22879 has exited CPU ID FUNCTION:NAME 0 96354 write:entry -Mike -- Mike Shapiro, Sun Microsystems Fishworks. blogs.sun.com/mws/