Paul van den Bogaard
2006-Sep-21  13:47 UTC
[dtrace-discuss] dtrace -q -s behaves differently than dtrace -qs
The file test.d contains:
#!/usr/sbin/dtrace -qs
pid$target:libc.so.1:_door*:return
{
    printf("%s:%s:%s:%s\n", probeprov, probemod, probefunc,
probename);
}
This one gives me the output I expect (I run it on the sshd process) 
However when I change only the first line to
#!/usr/sbin/dtrace -q -s
The result becomes:
dtrace: no probes specified
And the shell prompt appears again.
Is this "normal" behaviour. Can''t find anything in the man
pages.
Running it as a one-liner
dtrace  -q -n ''pid$target:libc.so.1:_door*:return {
printf("%s:%s:%s:%s\n", probeprov, probemod, probefunc, probename);
}'' -p 7044
gives me the same result as the "-q -s" variant: runs according to
expectation.
Thanks
Paul
 
 
This message posted from opensolaris.org
Menno Lageman
2006-Sep-21  13:59 UTC
[dtrace-discuss] dtrace -q -s behaves differently than dtrace -qs
Paul van den Bogaard wrote:> The file test.d contains: > > #!/usr/sbin/dtrace -qs > > pid$target:libc.so.1:_door*:return > { > printf("%s:%s:%s:%s\n", probeprov, probemod, probefunc, probename); > } > > This one gives me the output I expect (I run it on the sshd process) > > However when I change only the first line to > > #!/usr/sbin/dtrace -q -s > > The result becomes: > > dtrace: no probes specified > > And the shell prompt appears again. > > Is this "normal" behaviour. Can''t find anything in the man pages.See exec(2): An interpreter file begins with a line of the form #! pathname [arg] where pathname is the path of the interpreter, and arg is an optional argument. When an interpreter file is executed, the system invokes the specified interpreter. The pathname specified in the interpreter file is passed as arg0 to the interpreter. If arg was specified in the interpreter file, it is passed as arg1 to the interpreter. The remaining argu- ments to the interpreter are arg0 through argn of the origi- nally exec''d file. The interpreter named by pathname must not be an interpreter file. Cheers, Menno