Does DTrace on FreeBSD support macro argument?
Ryan Stone
rysto32 at gmail.com
Sat Aug 19 20:45:35 UTC 2017
If a script uses a positional argument like $1, the script will error
out if you don't provide that parameter. Try instead supplying a pid
on the command line:
# ./tracewrite.d 123
On Fri, Aug 18, 2017 at 3:27 AM, Nan Xiao <xiaonan830818 at gmail.com> wrote:
> Hi all,
>
> Greetings from me!
>
> I am trying the following simple script on FreeBSD 11:
>
> #!/usr/sbin/dtrace -s
>
> syscall::write:entry
> /pid == $1/
> {
> }
>
> and get following error:
>
> # ./tracewrite.d
> dtrace: failed to compile script ./tracewrite.d: line 4: macro
> argument $1 is not defined
>
> From this link(http://docs.oracle.com/cd/E19253-01/817-6223/chp-script-3/index.html),
> it seems FreeBSD doesn't support macro argument, right? If I want to
> use it, what is the correct method?
>
> Thanks very much in advance!
>
> Best Regards
> Nan Xiao
> _______________________________________________
> freebsd-dtrace at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
> To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe at freebsd.org"
More information about the freebsd-dtrace
mailing list